Jump to content
Sign in to follow this  
joltan

What gun you carry?

Recommended Posts

Is it possible to query from within a script what weapon a unit has selected at the moment? I'd like to use the radios from the nam pack, and while I know how to use 'hasweapon' to find out if a unit has a certain 'weapon' (like the radios), I would like to allow calling in support/airstrikes only when the radio is selected as weapon (or even better: when the fire button is pressed).

Any way to do that?

Share this post


Link to post
Share on other sites

You can add an eventhandler "Fired" to exec a script (the event passes the name of the weapon fired as a parameter)

Search the forum for details.

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (Axo @ Jan. 31 2003,16:30)</td></tr><tr><td id="QUOTE">You can add an eventhandler "Fired" to exec a script (the event passes the name of the weapon fired as a parameter)

Search the forum for details.<span id='postcolor'>

That's what i was looking for - I searched for "selected weapon" but nothing helpfull came up. Thanks!

Share this post


Link to post
Share on other sites

Yup I need this too

How can I tell when an AI has switched from m16 to a law in a script?

Any ideas?

Or for that matter when he has switched from a M16 to grenade?

eventhandler "fired" methinks wont work cause I need to know what hes currently selected not what hes just fired.

Cheers for any input confused.gif

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  

×