Jump to content
Sign in to follow this  
1para{god-father}

add action and condition

Recommended Posts

I need to add a add action to a civi which is fine but how do i have a condition in the addaction?

He will be in a marker "mhq" that changes from blue to red if the marker is blue allow the script getintel.sqf if not blue do not show addaction

this addAction ["Blah", "getintel.sqf"];

is that possible if so how :)

Thanks

Share this post


Link to post
Share on other sites

thanks , but how would i check to see if marker "MHQ" is blue if it is add the action, if red do not show it in the add action

Would i have to also do it in repeated trigger to check all the time ?

Share this post


Link to post
Share on other sites

(getmarkerColor "MHQ"== "ColorBlue") - boolean only within the addaction - not sure but this may help

Share this post


Link to post
Share on other sites

Ahh thanks!

OK this is what i have now, which works sort of!

If I set the Trigger to Radio Alpha and test it i get the Addaction as expected,....... but when I set it to Anyone Present it does not work, which i do not understand as i am in the trigger zone and so is the Civi ?

On Civi

this addAction ["Get Intel", "getintel.sqf",nil,6,true,true,"","MHQmarker"];

Trigger Condition

if (getmarkerColor "MHQ" == "ColorBlue") then  { MHQmarker=true; }  else { MHQmarker=false; };

Any idea why it only works when i set the Trigger to Radio ?

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  

×