Jump to content
Sign in to follow this  
lwoadam

Trigger Activated when Firing Launcher

Recommended Posts

Good Morning Everyone - let me say I am late to ARMA3 and have fallen down the rabbit hole of mission making.

 

In searching for what I am looking for I think I am both over my head and confused.  I am making a scenario in the Falklands of an Assault that happened that commenced with firing Launchers.

 

How can I make a trigger that commences the assault when I fire a LAW launcher?  I have tried a lot of things and have fallen short of my goal.

 

I'd be happy to activate when I shoot the launcher, but to have others shoot at the same time as what happened in real life would be even more ideal.  Can anyone help me with this as I am really struggling!!

 

Thank you in advance,

Share this post


Link to post
Share on other sites

To detect when a weapon is fired you can use an event handler like so

player addEventHandler ["Fired", {
	params ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_gunner"];
	
	if (_weapon == secondaryWeapon _unit) then {
		shotsFired = true;
	};
}];

This will set the shotsFired variable to true when a player fires any launcher. You can limit this to a specific weapon by replacing secondaryWeapon player with the classname of the weapon.

 

If you want this to activate your trigger, put:

!isNil "shotsFired"

into the condition field.

  • Like 2

Share this post


Link to post
Share on other sites
5 hours ago, _foley said:

To detect when a weapon is fired you can use an event handler like so


player addEventHandler ["Fired", {
	params ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_gunner"];
	
	if (_weapon == secondaryWeapon _unit) then {
		shotsFired = true;
	};
}];

This will set the shotsFired variable to true when a player fires any launcher. You can limit this to a specific weapon by replacing secondaryWeapon player with the classname of the weapon.

 

If you want this to activate your trigger, put:


!isNil "shotsFired"

into the condition field.

 

 

Thank you!!!! Just what I needed and worked like a charm.  Thank you sir - deciphering this as best I can now.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×