Need help with the badguy1 script
-
- Posts: 19
- Joined: Sun Jun 19, 2011 6:54 am
Need help with the badguy1 script
I viewed the How to Make a Free First Person Shooter part 3 on youtube and tried to copy down the script in the example. When I tried using it in my game it did not work. If anyone could look at what I typed and let me know if there are any errors, that would be great. Thanks!
{
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,0,"):
FadeOut(2,0):
Remove(true):
}]
Alert[()
{
PlayerDistorder(-800,"LostTarget")
AnimateStop("idle",0,""):
NewOrder("Attack"):
}]
Attack[()
{
RotateToPlayer("walk",160,false,""):
FireProjectile("pistol_shell", BIPO1 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"")
{
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,0,"):
FadeOut(2,0):
Remove(true):
}]
Alert[()
{
PlayerDistorder(-800,"LostTarget")
AnimateStop("idle",0,""):
NewOrder("Attack"):
}]
Attack[()
{
RotateToPlayer("walk",160,false,""):
FireProjectile("pistol_shell", BIPO1 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: Need help with the badguy1 script
check your email i got you a present
Re: Need help with the badguy1 script
np my friend but thats the only script im giving to you i want you to under stand so you can make your own. if you make your own scripts i will be happy to edit them for you . I like to share.
Re: Need help with the badguy1 script
remember to give me credit if anyone ask how you got the badguy1 script hough and if the game goes pro
- Nighthawk_0973
- Posts: 234
- Joined: Tue Apr 19, 2011 2:08 am
- Location: In front of my computer.
Re: Need help with the badguy1 script
Hey I've been having trouble with the rotation for this script. The guy starts facing the floor and he shoots me and kills me way to fast. I don't even know how he can shoot me while looking at the floor facedown as if he where dead. Here's my script:
Here's the badguy1 section of the Pawn.ini file:
I'm pretty sure it has something to do with the rotation. I copied it right of the How to make a first person shooter for free part 3 video by gigafide but still no luck.
Any help here my modifications don't seem to work and I can't really change to the rotation I need via Actor View as far as I know how...
Code: Select all
{
Spawn[()
{
Console(false);
AttributeOrder("enemy_health", 100, "Die");
FindTargetOrder(200, "Alert", "health");
SetFOV(360);
HostilePlayer(true);
HostileSame(false);
HostielDifferent(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", 5, "");
}
RestartOrder();
}]
LostTarget[()
{
BlendToAnimation("idle", 1, false, "");
FindTargetOrder(200, "Alert", "health");
}]
}
Code: Select all
[badguy1]
actorname = Badguy1.act
actorotation = 270 180 0
actorscale = 1.4
fillcolor = 255 255 255
ambientcolor = 255 255 255
subjecttogravity = true
boundingboxanimation = idle
shadowsize = 64
Any help here my modifications don't seem to work and I can't really change to the rotation I need via Actor View as far as I know how...
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: Need help with the badguy1 script
If he's facing the floor change this line to:[badguy1]
actorname = Badguy1.act
actorotation = 270 180 0
actorscale = 1.4
fillcolor = 255 255 255
ambientcolor = 255 255 255
subjecttogravity = true
boundingboxanimation = idle
shadowsize = 64
actor rotation 0 180 0
that should correct the problem i think
- Nighthawk_0973
- Posts: 234
- Joined: Tue Apr 19, 2011 2:08 am
- Location: In front of my computer.
Re: Need help with the badguy1 script
Argh! Still doesn't work. We was pointing his head to the wall and now he is pointing his head in a different direction. I tried messing with other settings but still no use...
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: Need help with the badguy1 script
Hey nighthawk I had big sucsess with this script.Anyways i found your error. In the Delay("hit",5,""); it has to be Delay("hit",1,""); not 5. Hope this helps. Or just email me and ill give you the correct script.
- Nighthawk_0973
- Posts: 234
- Joined: Tue Apr 19, 2011 2:08 am
- Location: In front of my computer.
Re: Need help with the badguy1 script
Could you just copy and paste the Pawn.ini and the badguy1.s script into a PM for me? Thanks.
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: Need help with the badguy1 script
no problem since im online.Ill give you the code right here right now
- Nighthawk_0973
- Posts: 234
- Joined: Tue Apr 19, 2011 2:08 am
- Location: In front of my computer.
Re: Need help with the badguy1 script
lol I just posted here so we're acually both online at the same time!
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: Need help with the badguy1 script
sounds good
Re: Need help with the badguy1 script
Code: Select all
[badguy1]
actorname = badguy1.act
actorrotation = 270 180 0
actorscale = 1.4
fillcolor = 255 255 255
ambientcolor = 255 255 255
subjecttogravity = true
boundingboxanimation = idle
shadowsize = 64
Code: Select all
{
Spawn[()
{
Console(false);
AttributeOrder("enemy_health",150,"Die");
FindTargetOrder(200,"Alert","health");
SetFOV(360);
HostilePlayer(true);
HostileSame(false);
HostileDifferent(false);
SetGroup("Enemy");
}]
Die[()
{
AnimateStop("die",0,"");
FadeOut(3,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,true,"");
FindTargetOrder(200,"Alert","health,");
}]
}
Re: Need help with the badguy1 script
theres the script its not regular cause i did major updates. I updated the script to make it correct.