Page 1 of 1
pawn script problem
Posted: Thu Nov 23, 2006 11:42 pm
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);
}]
}
Posted: Fri Nov 24, 2006 5:18 pm
by hindupower
can someone help me
Posted: Fri Nov 24, 2006 5:28 pm
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...
Posted: Sat Nov 25, 2006 1:26 am
by hindupower
thanks got it today. its just the captilization problem.
Re: pawn script problem
Posted: Thu Jun 02, 2011 9:14 pm
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"
}]
}
Re: pawn script problem
Posted: Fri Jun 03, 2011 12:04 am
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");
}]
Re: pawn script problem
Posted: Fri Jun 03, 2011 2:29 am
by megatop
thank you so much unfortunetly it doesnt work
Re: pawn script problem
Posted: Fri Jun 03, 2011 2:34 am
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
Re: pawn script problem
Posted: Fri Jun 03, 2011 2:44 am
by megatop
iknow
Re: pawn script problem
Posted: Fri Jun 03, 2011 8:59 pm
by megatop
how do i fix the script please help thanks
Re: pawn script problem
Posted: Fri Jun 03, 2011 9:13 pm
by megatop
got the script bernite i didnt do i simple thing thanks all of you guys your real smart
Re: pawn script problem
Posted: Sat Jun 04, 2011 2:22 am
by megatop
if anyone wants a free pawn script im real happy to share
Re: pawn script problem
Posted: Sat Jun 04, 2011 2:32 am
by megatop
now when add 2 of them 1 is fighting me the other just stands there doesnt move please help
-thanks
Re: pawn script problem
Posted: Sun Jun 05, 2011 3:30 pm
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
Re: pawn script problem
Posted: Mon Jun 06, 2011 6:53 am
by Nighthawk_0973
No clue
I added you btw.