iNeo 0 Posted February 17, 2003 Hi, I wonder if there's a way to check if a flare has been fired by any member in a certain group? /Neo Edit: Worth mentioning is that the team is fully player controlled - not AI. Share this post Link to post Share on other sites
Spitfire 0 Posted February 17, 2003 I can see two choices: 1) Use fired-eventhandler and check the type of ammo and if the person who fired it belongs to the group. Both the ammo type and the person are carried as a parameter for the script. 2) Use the built-in feature: onFlare.sqs -script which will be executed every time a flare is launched. A clip from the official comref: onFlare.sqs - launched when illuminating shell is lit(since 1.45) Â Â - arguments: [[r, g, b], gunner] - r, g, b is light color Share this post Link to post Share on other sites
InqWiper 0 Posted February 17, 2003 Put this in the init field of all the soldiers that U want to trigger something by firing a flare. this addeventhandler ["Fired",{obj=_this select 4;if (obj=="Flare") then {hint "Flare fired!"}}] Share this post Link to post Share on other sites
Spitfire 0 Posted February 17, 2003 </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (InqWiper @ Feb. 17 2003,19:01)</td></tr><tr><td id="QUOTE">this addeventhandler ["Fired",{obj=_this select 4;if (obj=="Flare") then {hint "Flare fired!"}}]<span id='postcolor'> I believe "Flare" works for white flares only. If green, red or yellow flares are fired, you'll need to modify the line a bit: this addeventhandler ["Fired",{obj=_this select 4;if (obj=="Flare" || obj=="FlareGreen" || obj=="FlareRed" || obj=="FlareYellow") then {hint "Flare fired!"}}] Share this post Link to post Share on other sites
iNeo 0 Posted February 17, 2003 Brilliant, thanks again Share this post Link to post Share on other sites