Scripted a turret but i don't take damage from it
Posted: Fri Jul 15, 2011 9:22 pm
I've scripted a turret out of badguy1, he rotates towards me and fires but there is no bullet explosion when he shoots at the wall. when he fires on me i don't take damage.
This is most of the script. Is there perhaps a value that must be increased to cause dmg to the player?
Another problem i have is the pawn only takes dmg if i shoot him in the feet. The crosshair only lights if i aim at his feet. Any help would be greatly appreciated.
Code: Select all
{
Spawn[()
{
Console(true);
AttributeOrder("health",20,"Die");
FindTargetOrder(250,"Alert","health");
SetFOV(360);
HotsilePlayer(true);
HostileSame(false);
HosileDifferent(false);
SetGroup("Enemy");
}]
Alert[()
{
AnimateStop("hit",0,"");
NewOrder("Attack");
}]
Attack[()
{
RotateToPlayer("idle",160,false,"");
FireProjectile("10mm_shell","BIP01 R FOREARM",0,0,0,"health","");
Delay("stattack",0.5,"");
RestartOrder();
}]
Another problem i have is the pawn only takes dmg if i shoot him in the feet. The crosshair only lights if i aim at his feet. Any help would be greatly appreciated.