Page 1 of 4
Need help with the badguy1 script
Posted: Fri Jun 24, 2011 5:26 pm
by bweinstein
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"")
Re: Need help with the badguy1 script
Posted: Fri Jun 24, 2011 5:54 pm
by megatop
check your email i got you a present
Posted: Fri Jun 24, 2011 6:51 pm
by bweinstein
Awesome. thanks so much!
Re: Need help with the badguy1 script
Posted: Fri Jun 24, 2011 7:12 pm
by megatop
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
Posted: Fri Jun 24, 2011 8:46 pm
by megatop
remember to give me credit if anyone ask how you got the badguy1 script hough and if the game goes pro
Re: Need help with the badguy1 script
Posted: Tue Jun 28, 2011 8:07 pm
by Nighthawk_0973
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:
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");
}]
}
Here's the badguy1 section of the Pawn.ini file:
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
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...
Re: Need help with the badguy1 script
Posted: Tue Jun 28, 2011 8:33 pm
by bernie
[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
If he's facing the floor change this line to:
actor rotation 0 180 0
that should correct the problem i think
Re: Need help with the badguy1 script
Posted: Tue Jun 28, 2011 9:48 pm
by Nighthawk_0973
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...
Re: Need help with the badguy1 script
Posted: Wed Jun 29, 2011 12:44 am
by megatop
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.
Re: Need help with the badguy1 script
Posted: Wed Jun 29, 2011 2:50 am
by Nighthawk_0973
Could you just copy and paste the Pawn.ini and the badguy1.s script into a PM for me? Thanks.
Re: Need help with the badguy1 script
Posted: Wed Jun 29, 2011 2:51 am
by megatop
no problem since im online.Ill give you the code right here right now
Re: Need help with the badguy1 script
Posted: Wed Jun 29, 2011 2:51 am
by Nighthawk_0973
lol I just posted here so we're acually both online at the same time!
Re: Need help with the badguy1 script
Posted: Wed Jun 29, 2011 2:52 am
by megatop
sounds good
Re: Need help with the badguy1 script
Posted: Wed Jun 29, 2011 2:53 am
by megatop
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
Posted: Wed Jun 29, 2011 2:54 am
by megatop
theres the script its not regular cause i did major updates. I updated the script to make it correct.