Jump to content
Sign in to follow this  
ringoray

Disable an AddAction for EAST player.

Recommended Posts

Hey guys, was wondering how you would go about removing an addAction command for East players. For instance disabling the 'apply loadout' from LEA for East players? Thanks in advance for any help.

Share this post


Link to post
Share on other sites
_side = side _unit;

if (_side == EAST) then {_unit removeAction _index};

Cheers for the response, but where would i implement that code?

Share this post


Link to post
Share on other sites

I don't use LEA so I don't know at what point in mission scripting the addAction is given to the unit.

Generally, it would go in a block of code immediately following the addAction being added to the unit, so that the addAction is immediately removed if given to an EAST unit. The preventive approach would be to allow the addAction to be added only if not EAST:

if (_side != EAST) then { ....run the code giving the addAction... };

Share this post


Link to post
Share on other sites
I don't use LEA so I don't know at what point in mission scripting the addAction is given to the unit.

Generally, it would go in a block of code immediately following the addAction being added to the unit, so that the addAction is immediately removed if given to an EAST unit. The preventive approach would be to allow the addAction to be added only if not EAST:

if (_side != EAST) then { ....run the code giving the addAction... };

Cheers again, basically when a player using LEA scrolls his mouse he has the option to 'Apply loadout' as well as all the usual changing to binoculars and weapon and such. I am running insurgency with LEA allowed on the server. So I want the 'apply loadout' option to be unavailable to opfor players. Thanks for your help anyway man, appreciate it much.

Share this post


Link to post
Share on other sites

Having watched this video I have the impression the LEA addAction is given to players in proximity to a respawn marker or object. Players only see the addAction when in proximity.

Running a server isn't in my experience range. On mission editor side, thoughts are an event handler added to units during init, or a repeating trigger encompassing the respawn zones. But the code being run would need some means of identifying and referencing the addaction ID assigned by the LEA. That may or may not be complicated.

I'm sure it wouldn't be the best way of handling it as well. I would think server would have a better means of doing it, I just don't have that experience.

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  

×