Jump to content
Sign in to follow this  
celery

Remove all custom menu actions

Recommended Posts

How can I remove all actions created with the addAction command in the action menu, preferably without specifying each and every one of them with their own remove commands?

Share this post


Link to post
Share on other sites

You have to remove one at a time. They start at index 0.

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_lastindex = _this addaction ["", ""];

for [{_i = 0}, {_i <= _lastindex}, {_i = _i + 1}] do {

_this removeaction _i;

};

Doolittle

Share this post


Link to post
Share on other sites

Legend i just spent hours deciphering this whoop :yay:

I used this if anyone want for future reference.

_lastindex = player addaction ["", ""]; for [{_i = 0}, {_i <= _lastindex}, {_i = _i + 1}] do {player removeaction _i; hint format ["ActionID :%1",_i]};

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  

×