Fire rate (high level)
Posted: Wed Sep 21, 2011 3:49 pm
I have this pawn on a wall that fires with a small delay between shots,yet it keeps firing all the time.
I do not know how to make it repeat that fire order for a certain amount of time,then go to an other order to play a delay for some seconds (so you can pass over the trap) and then go back to the fire order.
And,f i could randomize it to use a min and max pause time,even better.
{
Spawn[ ()
{
Console(true);
BoxWidth(16); // set bounding box width/depth
NewOrder("Fire");
} ]
Fire[ ()
{
FireProjectile("Firebolt", "BONE02", 0, 0, 0, "health", "");
Delay("Idle", 0.4, "");
AttributeOrder("health", 20, "Destoyed");
RestartOrder();
} ]
Destoyed[ ()
{
AddExplosion("Firebolt1Explosion", "BONE02", 0,0,0);
SetEventState("Trap1Trigger", true);
Remove(true);
} ]
}
I do not know how to make it repeat that fire order for a certain amount of time,then go to an other order to play a delay for some seconds (so you can pass over the trap) and then go back to the fire order.
And,f i could randomize it to use a min and max pause time,even better.
{
Spawn[ ()
{
Console(true);
BoxWidth(16); // set bounding box width/depth
NewOrder("Fire");
} ]
Fire[ ()
{
FireProjectile("Firebolt", "BONE02", 0, 0, 0, "health", "");
Delay("Idle", 0.4, "");
AttributeOrder("health", 20, "Destoyed");
RestartOrder();
} ]
Destoyed[ ()
{
AddExplosion("Firebolt1Explosion", "BONE02", 0,0,0);
SetEventState("Trap1Trigger", true);
Remove(true);
} ]
}