Jump to content
  • 0

Deleting marker with trigger


Stollenwerk

Question

Hey there,

I know it has to be very simple, but I'm stuck on this atm.
Maybe someone can give me a push in the right direction.

I want to place a global marker and want to delete it again with a trigger, when a player activates the trigger.

So that's what I got so far:

	_marker = createMarker ["BOX", _object];
	_marker setMarkerType "hd_start";
	_marker setMarkerColor "ColorRed";
	
	_trigger = createTrigger ["EmptyDetector", "getMarkerPos _marker"];
	_trigger setTriggerArea [5, 5, 0, false];
	_trigger setTriggerActivation ["ANY", "PRESENT", true];
	_trigger setTriggerStatements ["this", "deleteMarker _marker", ""];

I'm pretty sure that the error(s) are in these 2 lines:

	_trigger = createTrigger ["EmptyDetector", "getMarkerPos _marker"];
	_trigger setTriggerStatements ["this", "deleteMarker _marker", ""];

I'm not sure what to put in as string code for deactivation. Trigger should be deleted as well of course, after the marker is deleted.

Thanks in advance. :rolleyes:

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Discord

×
×
  • Create New...