Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » Trigger_Weapon help
Re: Trigger_Weapon help [message #255362 is a reply to message #255294] Mon, 23 April 2007 23:58 Go to previous messageGo to previous message
zunnie is currently offline  zunnie
Messages: 2959
Registered: September 2003
Location: Netherlands
Karma:
General (2 Stars)

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..


https://multiplayerforums.com/uploads/monthly_2018_03/TCW2_Signature.png.6236a0dbc6e1e53472a18fe8cd15e47b.png

[Updated on: Tue, 24 April 2007 00:02]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Doctor Who mod?
Next Topic: A way to NEVER EVER see "Recruit" under your name again?
Goto Forum:
  


Current Time: Fri Jan 10 10:25:55 MST 2025

Total time taken to generate the page: 0.01714 seconds