pawn script problem
-
- Posts: 7
- Joined: Thu Nov 23, 2006 9:46 pm
pawn script problem
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);
}]
}
{
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);
}]
}
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...
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.
-----
-----
-
- Posts: 7
- Joined: Thu Nov 23, 2006 9:46 pm
Re: pawn script problem
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"
}]
}
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
at the bottom of your script
there is a bracket and a semi colon missing.
It should read
Code: Select all
LostTarget[()
{
BlendToAnimation("idle",1,false"");
FindTargetOrder(200,"Alert","health"
}]
It should read
Code: Select all
LostTarget[()
{
BlendToAnimation("idle",1,false"");
FindTargetOrder(200,"Alert","health");
}]
Re: pawn script problem
thank you so much unfortunetly it doesnt work
- Nighthawk_0973
- Posts: 234
- Joined: Tue Apr 19, 2011 2:08 am
- Location: In front of my computer.
Re: pawn script problem
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
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 ) note: RF isn't an MMO maker. Not yet anyways.
Re: pawn script problem
how do i fix the script please help thanks
Re: pawn script problem
got the script bernite i didnt do i simple thing thanks all of you guys your real smart
Re: pawn script problem
if anyone wants a free pawn script im real happy to share
Re: pawn script problem
now when add 2 of them 1 is fighting me the other just stands there doesnt move please help
-thanks
-thanks
Re: pawn script problem
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
- Nighthawk_0973
- Posts: 234
- Joined: Tue Apr 19, 2011 2:08 am
- Location: In front of my computer.
Re: pawn script problem
No clue
I added you btw.
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 ) note: RF isn't an MMO maker. Not yet anyways.