pawn script problem

Topics regarding Scripting with Reality Factory
Post Reply
hindupower
Posts: 7
Joined: Thu Nov 23, 2006 9:46 pm

pawn script problem

Post by hindupower »

I put this script and saved it as enemy1.s and put that for a pawn, but it dosen't work. all it does is look around. Can someone help me?
{

start [ ()
{
attributeorder("enemy_health",10,"death");
playanimation("idle",true,"");
RotateMoveToPoint("walk", 100, 20, true, "footsteps\\m1.wav");
MoveToPoint("walk", 50, "footsteps\\m1.wav");
neworder("Patrol");
}]

Patrol [ ()
{
nextpoint();
RotateMoveToPoint("walk", 100, 20, true, "footsteps\\m1.wav");
MoveToPoint("walk", 50, "footsteps\\m1.wav");
restartorder();
}]

death [ ()
{
stopanimation("die_1",0.5,"");
SetEventState("Enemy1Dead", true);
}]

}
hindupower
Posts: 7
Joined: Thu Nov 23, 2006 9:46 pm

Post by hindupower »

can someone help me
Jay
RF Dev Team
Posts: 1232
Joined: Fri Jul 08, 2005 1:56 pm
Location: Germany

Post by Jay »

I am not sure but it could be that you have to have exactly the same spelling of the commands.

So PlayAnimation(...)
and not playanimation(...)

or NextPoint()
instead of nextpoint()

I suggest you to first use the Console(true) command in the first order and see what the console says...
Everyone can see the difficult, but only the wise can see the simple.
-----
hindupower
Posts: 7
Joined: Thu Nov 23, 2006 9:46 pm

Post by hindupower »

thanks got it today. its just the captilization problem. :D
megatop
Posts: 184
Joined: Thu Jun 02, 2011 12:36 am

Re: pawn script problem

Post by megatop »

not to bother anyone but i downloaded the Badguy1.act from GameFront.com/user/RealityFactory
and made a script for it and it works but when i go away from him than come back he isnt in idle mode he just stands there please help heres te script but otherwise its ok

{
Spawn[()
{
Console(false);
AttributeOrder("enemy_health",100,"Die");
FindTargetOrder(200,"Alert","health");
SetFOV(360);
HostilePlayer(true);
HostileSame(false);
HostileDifferent(false);
SetGroup("Enemy");
}]

Die[()
{
AnimateStop("die",0,"");
FadeOut(2,0);
Remove(true);
}]

Alert[()
{
PlayerDistOrder(-800,"LostTarget");
AnimateStop("idle",0,"");
NewOrder("Attack");
}]

Attack[()
{
RotateToPlayer("walk",160,false,"");
FireProjectile("pistol_shell","BIP01 R FOREARM",0,0,0,
"health","");
if(self.player_range>96)
{
MoveForward("walk",50,50,"");
}
else
{
Delay("hit",1,"");
}
RestartOrder();
}]

LostTarget[()
{
BlendToAnimation("idle",1,false"");
FindTargetOrder(200,"Alert","health"
}]
}
User avatar
bernie
RF Moderator
Posts: 1249
Joined: Tue Nov 15, 2005 10:07 am
Location: Ireland

Re: pawn script problem

Post by bernie »

at the bottom of your script

Code: Select all

LostTarget[()
{
BlendToAnimation("idle",1,false"");
FindTargetOrder(200,"Alert","health"
}]
there is a bracket and a semi colon missing.
It should read

Code: Select all

LostTarget[()
{
BlendToAnimation("idle",1,false"");
FindTargetOrder(200,"Alert","health");
}]
megatop
Posts: 184
Joined: Thu Jun 02, 2011 12:36 am

Re: pawn script problem

Post by megatop »

thank you so much unfortunetly it doesnt work :(
User avatar
Nighthawk_0973
Posts: 234
Joined: Tue Apr 19, 2011 2:08 am
Location: In front of my computer.

Re: pawn script problem

Post by Nighthawk_0973 »

There's a youtube video that makes a good script for him. It's either:

How to make a first person shooter for free part 1

part 2

or part 3
https://sites.google.com/site/theneverendinguniverse/ <-- Infinite Universe Website. It's a 2D MMORPG I'm releasing into beta near the late summer (I hope :D) note: RF isn't an MMO maker. Not yet anyways.
megatop
Posts: 184
Joined: Thu Jun 02, 2011 12:36 am

Re: pawn script problem

Post by megatop »

iknow
megatop
Posts: 184
Joined: Thu Jun 02, 2011 12:36 am

Re: pawn script problem

Post by megatop »

how do i fix the script please help thanks
megatop
Posts: 184
Joined: Thu Jun 02, 2011 12:36 am

Re: pawn script problem

Post by megatop »

got the script bernite i didnt do i simple thing thanks all of you guys your real smart
megatop
Posts: 184
Joined: Thu Jun 02, 2011 12:36 am

Re: pawn script problem

Post by megatop »

if anyone wants a free pawn script im real happy to share
megatop
Posts: 184
Joined: Thu Jun 02, 2011 12:36 am

Re: pawn script problem

Post by megatop »

now when add 2 of them 1 is fighting me the other just stands there doesnt move please help







-thanks
megatop
Posts: 184
Joined: Thu Jun 02, 2011 12:36 am

Re: pawn script problem

Post by megatop »

anther problem when when i run the game the pawn works properly but when i leave he goes to idle he does idle once than stops and i come neer him he will attack me but again if i leave he does idle once than stops can i have a litle support thaks
User avatar
Nighthawk_0973
Posts: 234
Joined: Tue Apr 19, 2011 2:08 am
Location: In front of my computer.

Re: pawn script problem

Post by Nighthawk_0973 »

No clue :D

I added you btw.
https://sites.google.com/site/theneverendinguniverse/ <-- Infinite Universe Website. It's a 2D MMORPG I'm releasing into beta near the late summer (I hope :D) note: RF isn't an MMO maker. Not yet anyways.
Post Reply