Jump to content
Sign in to follow this  
warezflogga

Removing 'addaction' buttons.

Recommended Posts

Hello All,

Here's a toughy. In the Init line of a trigger you can say......

aP AddAction ["confused.gif","tounge.gif.sqs"] to bring up a menu bar button named "confused.gif" that will execute the tounge.gif.sqs file when activated.

My question is, can you set an init line (activated by a trigger) that will remove this button from the menu bar and by that, the accessability of the script?

sad.gif

Share this post


Link to post
Share on other sites

Hi,

yes you can delete an action entry but you must know its ID number.

When adding the action write something like this:

actionID = unit AddAction["text", "script.sqs"]

To remove this action do this:

unit RemoveAction actionID

Hope this helps,

Spinor

Share this post


Link to post
Share on other sites

Yes. If you add an action ID it's easy to remove the added action:

layBomb = player addAction["Lay Bomb","bomb.sqs"]

The action ID here is "layBomb". To remove the action, simply add this line:

player removeAction layBomb

Share this post


Link to post
Share on other sites

Thank you both. This will make all the difference to my mission. If you want to see who is quicker on the trigger, I offer these questions.

On your marks.......

Q1: Is it possible to set a trigger so that only the player can activate it? And if so, how?

Q2: If i create a unit and set its condition as FALSE it will vanish from the game. Is there a dialog that can be typed somewhere that will set the unit as TRUE halfway through the mission? Thus making the unit appear when you wish.

As always, any clues would be appreciated.

Share this post


Link to post
Share on other sites

A1.Yes, just group the trigger to the player using f2. Then new options appear in the triggers properties, allowing just the player to activate the trigger. smile.gif

Share this post


Link to post
Share on other sites

We'll i'll be stuffed. Never knew you could link them together.

My hat off to you.

biggrin.gif

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 (warezflogga @ Feb. 27 2002,07:02)</td></tr><tr><td id="QUOTE">Q2: If i create a unit and set its condition as FALSE it will vanish from the game. Is there a dialog that can be typed somewhere that will set the unit as TRUE halfway through the mission? Thus making the unit appear when you wish.

As always, any clues would be appreciated.<span id='postcolor'>

Well,, you have the create unit comand. Use that smile.gif

Share this post


Link to post
Share on other sites

Could you possibly elaborate on the CREATE UNIT command?

I'm clearly inept in this department. If you can explain it in lamen, I'd be very grateful. Thanks for your replay all the same.

Warezflogga.

confused.gifwink.gif

Share this post


Link to post
Share on other sites

Could you possibly elaborate on the CREATE UNIT command?

I'm clearly inept in this department. If you can explain it in lamen, I'd be very grateful. Thanks for your replay all the same.

Warezflogga.

confused.gifwink.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  

×