Jump to content

Sign in to follow this  
der.hannes

(addaction) actionmenu wont disapear

Recommended Posts

i have some triggers wich give player an actionmenu entry when you enter the trigger-area, and you should loose it when leaving the area.

onAct: id5 = Player addAction ["speak","scripts\story_josef3.sqs"];

onDeakt: player removeaction id5;

this works fine until i change trigger-condition from "this" to my custom conition!

when i use own condition, the action menu entry is visible and useable everywhere on the map when the condition is true.

what can i do?

Edited by der.hannes

Share this post


Link to post
Share on other sites
  der.hannes said:
i have some triggers wich give player an actionmenu entry when you enter the trigger-area, and you should loose it when leaving the area.

onAct: id5 = Player addAction ["speak","scripts\story_josef3.sqs"];

doDeakt: player removeaction id5;

this works fine until i change trigger-condition from "this" to my custom conition!

when i use own condition, the action menu entry is visible and useable everywhere on the map when the condition is true.

what can i do?

I must have missed the obvious... but... what is you custom condition ?

Share this post


Link to post
Share on other sites

i have different conditions, for example "tsk1compl" (gets true when task1 is complete).

the triggers are exactly same like the ones that are working, only difference is the condition (and the different unit names etc).

Share this post


Link to post
Share on other sites

Hi, be sure to doublecheck your conditions and if your having conditions relying upon being true or false in this perticular case you will have to write their initial condition into an init.sqf, for example if you want an action to display after tsk1compl == true, than you should have a trigger with that addactiona nd removeaction (that part you are doing correct) but you must write to the init.sqf tsk1compl = false, im actually not sure if this will help you, but it is something to consider as these things sometimes work kinda funky and you can easilly miss the obvious

Share this post


Link to post
Share on other sites

i have set my conditions in the init.sqs but its still the same:

after condition=true, the actionmenuentry is use/visible everywhere on map (should be only visible when entering trigger area)

must this be my mistake? but i try this for 3 days now and there is not much to do wrong, and like said i have working actionmenu-triggers with condition this.

please help

Share this post


Link to post
Share on other sites

Why not just put the condition in the action itself? That way you don't have to worry about adding/removing it.

Share this post


Link to post
Share on other sites

how do i put condition in action itself? im a scripting-noob.

do i need to add text to script wich starts? till now it starts with:

_gen = _this select 0;

_caller = _this select 1;

_id = _this select 2;

_gen removeAction _id;

what do i have to add to set condition? cant find example to copy and paste on biki.

thanks for help

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  

×