Stoll

Delete marker with trigger

11 posts in this topic

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:

Share this post


Link to post
Share on other sites
Advertisement

Hm, these files look useful, but I think it's not what I'm looking for.
Maybe I just don't know how to use them for my intend.

Still trial and error for 2 days now....:(

This code from the eden editor works fine.
I simply dunno, how to convert it correctly for using it in a script:
 

	class Entities
	{
		items=3;
		class Item0
		{
			dataType="Marker";
			position[]={4802.9214,5,1411.3457};
			name="marker_0";
			type="hd_start";
			id=0;
		};
		class Item1
		{
			dataType="Trigger";
			position[]={5616.7749,5,1528.123};
			class Attributes
			{
				onActivation="deleteMarker ""marker_0""";
				sizeA=5;
				sizeB=5;
				activationBy="ANY";
				isRectangle=1;
			};
			id=1;
			type="EmptyDetector";
		};

 

Edited by Stoll

Share this post


Link to post
Share on other sites

Well, unfortunately I have no clue how to use these files for my intend. :|

Overall, I don't have to delete the trigger. It's more important for me how to remove the marker with the trigger!

Edited by Stoll

Share this post


Link to post
Share on other sites
On 5.8.2016 at 7:17 AM, marcelotk said:

@Stoll do you can made this work?

I had it working once, but when a new player joined the game (or after a relog) the marker is back on the map.
So, I gave up at this point and used permanent markers. -_-

Share this post


Link to post
Share on other sites
On 08.03.2016 at 1:19 PM, Stoll said:

Push :ph34r:

No one? Shouldn't be too hard, but I'm still failing to get it working. O.o

Hi there. Triggers is the problem every where! I work with it right now. If any news i will let you know if do not forget about.

Share this post


Link to post
Share on other sites
Advertisement

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

  • Recently Browsing   0 members

    No registered users viewing this page.