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

Variable in Trigger how ?

Recommended Posts

I am creating a Marker with a trigger area around it , but how can I refer to that marker in the trigger using the variable ?, I call this script a few time so need to keep the variables.


_id= floor(random 10000);
_t = format["s%1",_id];

_m = [_t, _RandomTownPosition, "ELLIPSE", [150, 150], "COLOR:", "Colorred", "TEXT:", _t,"GLOBAL", "PERSIST"] call CBA_fnc_createMarker;


_triggeram1 = createTrigger["EmptyDetector",[_RandomTownPosition select 0, _RandomTownPosition select 1,0]];
_triggeram1 setTriggerArea [160,160,0,false];
_triggeram1 setTriggerActivation ["WEST","PRESENT",false];
_triggeram1 setTriggerTimeout [1,1,1,true];
_triggeram1 setTriggerStatements ["this", "  _t setMarkerColor 'ColorBlack'; ",""];

OR is that the wrong way to change the color of the CBA marker ?

Edited by psvialli

Share this post


Link to post
Share on other sites

_m = [_t, _RandomTownPosition, "ELLIPSE", [150, 150], "COLOR:", "[b]ColorBlack[/b]", "TEXT:", _t,"GLOBAL", "PERSIST"] call CBA_fnc_createMarker;

You can define the color there.

 Color is one of:
"Default"
"ColorBlack"
"ColorRed"
"ColorRedAlpha"
"ColorGreen"
"ColorGreenAlpha"
"ColorBlue"
"ColorYellow"
"ColorOrange"
"ColorWhite"
"ColorPink"
"ColorBrown"
"ColorKhaki"

EDIT: misread OP.

Edited by cuel

Share this post


Link to post
Share on other sites

_triggeram1 setTriggerStatements ["this", format ["'%1' setMarkerColor 'ColorBlack'", _t],""];

Xeno

Share this post


Link to post
Share on other sites
_triggeram1 setTriggerStatements ["this", format ["'%1' setMarkerColor 'ColorBlack'", _t],""];

Xeno

Many thanks that done the job

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  

×