Jump to content
Sign in to follow this  
hansson0728

Waituntil markercolor

Recommended Posts

Okey, i dont know if this has been up before, i couldnt find anything.

 

iam trying to check if a marker has changed color.. it is for using EOS with tasks.

 

MapClickEOS_Patrol = 
{
	// Create EOS Zone
	_Size 		= _this select 0;
	_groups 	= _this select 1;
	_grpSize 	= _this select 2;
	_Pos	 	= _this select 3;
	
	// Create Marker Zone
	_m = createMarker [format ["Patrol%1", Random 1000],_pos];
	_m setMarkerShape "ELLIPSE";
	_m setMarkerSize [_size,_size];
	_m setMarkerBrush "Solid";
	_m setMarkerColor "ColorRed";
	// Close map
	titletext ["Zone Created",""];
	
	// Create EOS Zone
	null = [[_m],[0,0],[_groups,_grpSize,100],[0,0],[0],[0],[0,0],[5,0,300,EAST,TRUE]] call EOS_Spawn;
	sleep 5;
	waitUntil {sleep 5; getMarkerColor _m == "ColorGreen"};
	hint "Area CLEAR";
	
};

 

 

i get expression error no matter what i do :(

i know its probably something small but i cant figure it out, everything works as it should except the waituntil....

Share this post


Link to post
Share on other sites

The code looks fine ,make sure your function is spawned  for scheduled environment if you want to suspend it.

Share this post


Link to post
Share on other sites

Awesome, Spawning it made the difference.. if anyone is interested, iam creating a small sandbox where you can spawn Zones and stuff from DiaryRecords

 

http://pasteboard.co/oLJ31Twi8.jpg

http://pasteboard.co/oLKp1LkQC.jpg

http://pasteboard.co/2tzH9K2hc.jpg

http://pasteboard.co/oLLjyONJY.jpg

 

ping me if youre interested..

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  

×