Jump to content
Sign in to follow this  
zakiechan

DeleteMarker command only clearing global channel, user markers

Recommended Posts

Having issues with some code im working on.

I want to be able to wipe all map markers, except for a few I have white-listed during various points in the mission.

All code is run on the dedicated server, using the deletemarker command I cannot delete any user placed markers that are not in global channel.

client side event handler:

"makeAddActionSaveCurrentMarkers" addPublicVariableEventHandler
{	
	private ["_sign", "_passedContent"];

			_passedContent = _this select 1; //form [signObject]
			_sign = _passedContent;
			_sign addAction["<t color='#FF0000'>Save all Current Markers</t>", {  

			//code that runs on addAction
			playerUsedSaveCurrentMarkers = true;
			publicVariableServer "playerUsedSaveCurrentMarkers";

			}, 0, 4];

};

serverside eventhandler:

"playerUsedSaveCurrentMarkers" addPublicVariableEventHandler
{	
	whiteListedMarkers = allMapMarkers;
};

ServerSide Code to delete non whitelisted markers:

{ 
if ( !(_x in whiteListedMarkers) ) then
 {
 deleteMarker _x;
 };
} forEach allMapMarkers;

I am assuming my problem is locality.

If anyone has ideas or prior experience with such an issue your help would be greatly appreciated!

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  

×