Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » Trigger_Weapon help
Trigger_Weapon help [message #255294] Mon, 23 April 2007 15:07 Go to next message
a100 is currently offline  a100
Messages: 45
Registered: March 2007
Karma: 0
Recruit
Does Trigger_Weapon not work or am i just not using the code right?

Heres what i beleive the parameters are

GameObject *obj = Player to shoot from
bool fire = fire or not?
const Vector3 &location = Location to fire?
bool primary = secondary/primary fire

Huh

[Updated on: Mon, 23 April 2007 15:12]

Report message to a moderator

Re: Trigger_Weapon help [message #255362 is a reply to message #255294] Mon, 23 April 2007 23:58 Go to previous messageGo to next message
zunnie is currently offline  zunnie
Messages: 2959
Registered: September 2003
Location: Netherlands
Karma: 0
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

Re: Trigger_Weapon help [message #255394 is a reply to message #255294] Tue, 24 April 2007 04:42 Go to previous messageGo to next message
a100 is currently offline  a100
Messages: 45
Registered: March 2007
Karma: 0
Recruit
I will be trying your method shortly

But ill show you whaat i want to achieve

			found = words[1].find("!dtest");
			if (found >= 0){
				Vector3 posi = Commands->Get_Position(Get_GameObj(Get_ID_Name(words[3].c_str()));
				Commands->Trigger_Weapon(Get_GameObj(ID),true,posi,true);
				Commands->Trigger_Weapon(Get_GameObj(ID),false,posi,true);

			}

This also doesnt work when the player is rigth infront

Weapon doesnt shoot, i think trigger weapon doesnt work with infantry

[Updated on: Tue, 24 April 2007 04:43]

Report message to a moderator

Re: Trigger_Weapon help [message #255485 is a reply to message #255394] Tue, 24 April 2007 14:15 Go to previous messageGo to next message
zunnie is currently offline  zunnie
Messages: 2959
Registered: September 2003
Location: Netherlands
Karma: 0
General (2 Stars)

a100 wrote on Tue, 24 April 2007 07:42


Weapon doesnt shoot, i think trigger weapon doesnt work with infantry


It problably doesnt work with players, but only on bots and empty vehicles. Not tested it so dunno for sure.


https://multiplayerforums.com/uploads/monthly_2018_03/TCW2_Signature.png.6236a0dbc6e1e53472a18fe8cd15e47b.png
Re: Trigger_Weapon help [message #255499 is a reply to message #255294] Tue, 24 April 2007 14:58 Go to previous messageGo to next message
a100 is currently offline  a100
Messages: 45
Registered: March 2007
Karma: 0
Recruit
ok so i tried your script but it doesnt seem to work with bots/empty vecs so idk

EDIT: Well it works with bots but the problem is the no animations show up =\

[Updated on: Tue, 24 April 2007 15:07]

Report message to a moderator

Re: Trigger_Weapon help [message #255535 is a reply to message #255294] Tue, 24 April 2007 17:26 Go to previous messageGo to next message
zunnie is currently offline  zunnie
Messages: 2959
Registered: September 2003
Location: Netherlands
Karma: 0
General (2 Stars)

Maybe you have to use Commands->Select_Weapon(obj,"TheWeapon"); first and then trigger it?

Maybe jonwil can reply here at some point Razz


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

[Updated on: Tue, 24 April 2007 17:30]

Report message to a moderator

Re: Trigger_Weapon help [message #255608 is a reply to message #255294] Wed, 25 April 2007 04:36 Go to previous message
a100 is currently offline  a100
Messages: 45
Registered: March 2007
Karma: 0
Recruit
After along time i found this out

Trigger_Weapon does work with players but the problem is no animations, and also you cant use it with chat hook but instead you need to make/add a script to do it.
Aslo can someone explain how to get animations for bullets working?
Previous Topic: Doctor Who mod?
Next Topic: A way to NEVER EVER see "Recruit" under your name again?
Goto Forum:
  


Current Time: Sun Sep 08 02:20:28 MST 2024

Total time taken to generate the page: 0.00730 seconds