Results 1 to 4 of 4

  Click here to go to the first Developer post in this thread.  

Thread: What gun you carry?

  1. #1
    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?

  2. #2
    Private First Class
    Join Date
    Jun 30 2002
    Location
    Campańa de Malvinas MOD
    Posts
    12
    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.

  3. #3
    Sergeant Major
    Join Date
    Feb 23 2002
    Location
    Germany
    Posts
    1,426
    Author of the Thread
    </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.[/QUOTE]<span id='postcolor'>
    That&#39;s what i was looking for - I searched for "selected weapon" but nothing helpfull came up. Thanks&#33;

  4.   This is the last Developer post in this thread.   #4
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •