I would guess something like this:
For example if you want a mammoth to attack the hand of nod with
its rockets, you could have the script look for the hand of nod controller and get its position etc like:
void attackhand::Created(GameObject *obj)
{
Commands->Start_Timer(obj,this,5.0f,101);
}
void attackhand::Timer_Expired(GameObject *obj, int number)
{
if (number == 101)
{
GameObject *hand = Find_Building(0,SOLDIER_FACTORY);
Vector3 attackloc = Commands->Get_Position(hand);
Commands->Trigger_Weapon(obj,true,attackloc,false);
Commands->Start_Timer(obj,this,5.0f,101);
}
}
This will loop until the mammoth is destroyed..
[Updated on: Tue, 24 April 2007 00:02]
Report message to a moderator