Jump to content

Recommended Posts

I would like a marker to disappear when the objective is completed. Using setMarkerAlpha does not work.

Share this post


Link to post
Share on other sites

These are options how to do that, it depends on if you want to completely delete the marker or not:

  • using deleteMarker which will completely delete/destroy the given marker
  • using setMarkerSize which will only set the zero x and y axis of the marker, so you can still access to the marker by the script/code

Hope this helped!

Share this post


Link to post
Share on other sites

Why doesn't setMarkerAlpha work?

Share this post


Link to post
Share on other sites
9 minutes ago, code34 said:

why dont you use deletemarker ? :D

 

https://community.bistudio.com/wiki/deleteMarker

In the back of mind I knew something like this had to exist. Of course the pages I looked at referenced createMarker, but not deleteMarker. Haha. Probably should have looked at all the marker commands. Thanks!

 

7 minutes ago, HazJ said:

Why doesn't setMarkerAlpha work?

As far as this, I am not sure why it doesn't work, but when I put this command in a trigger, it does nothing. An example I read recommended to put it in an init file, so that could be the problem - if some commands are tricky like that.

Share this post


Link to post
Share on other sites

Why not change ur marker into a empty one?!?

 

http://www.armaholic.com/forums.php?m=posts&q=8786

 

Quote

# W0lle :


You again... :)

The easiest way is to place an empty marker where you want them appear later. Once the condition is met you can show the marker by simply changing it's type using:


mymarker is the name of the marker in question. A list of all available marker types you find here.

"mymarker" setMarkerType "mil_pickup"
 

 

They want to show a marker after a sudden point, while you can use it to hide you marker to.

Empty markers are not being shown for players, so why not use that?

 

So for example you place down a empty marker, and you call this marker MyMarker1.

Now whenever you want to show the marker to player you can use this code:

"mymarker" setMarkerType "mil_pickup";

And then afterwards to hide it again you can use this:

"mymarker" setMarkerType "empty";

 

Share this post


Link to post
Share on other sites
7 hours ago, QuiveringT said:

I would like a marker to disappear when the objective is completed. Using setMarkerAlpha does not work.

 

Could you explain how do you create and how you are trying to change it? All these solutions are working but you need to point at the right marker, sometimes not evident.

Share this post


Link to post
Share on other sites

I got around to testing this a minute back, and I think it is an issue with the way I was trying to make the markers disappear.

 

On 10/31/2017 at 9:19 AM, pierremgi said:

 

Could you explain how do you create and how you are trying to change it? All these solutions are working but you need to point at the right marker, sometimes not evident.

I created the makers by placing them in the Eden Editor and I was trying to remove then using triggers, but whether it was through using setMarkerAlpha or deleteMarker, no change was being produced. In addition, I have verified that I was calling the correct marker, (marker1 I believe). I may just be late on the train for this, but the trigger was also handling a couple of other tasks, i.e. completing an objective, setting a variable; so it's possible that a trigger can only handle so much.

 

In using the debug menu I was able to correctly manipulate the markers.

 

Since I created the markers in the Eden Editor, how could I get them to disappear using coding in the related text files, say after x == true?

Share this post


Link to post
Share on other sites

Just name them mk1, mk2 ... or any name, then DeleteMarker "mk1"; deleteMarker "mk2"... Pay attention for syntax.

You can script huge script in on act field of a trigger, or execVM an sqf. It's same but more convenient for editing the script. Don't add comment in trigger (or use comment instead of //). You can setMarkerAlpha also.

 

Share this post


Link to post
Share on other sites

setmarkeralpha works fine for me. dont forget the ".." arround the markername. 

 

shareing code always helps a lot

Share this post


Link to post
Share on other sites

Update: deleteMarker does work. I just confirmed in my mission that is exactly what I'm doing. It's been a while since I started this topic so I can't remember what I was seeing then, but today deleteMarker does indeed work. Sorry about that.

 

However, deleteMarker is not instant. It takes a couple seconds for the marker to correctly disappear. It could be related to the issues I was having with triggers earlier, who knows. Thanks to @code34 for introducing me to deleteMarker.

Share this post


Link to post
Share on other sites
3 hours ago, QuiveringT said:

However, deleteMarker is not instant. It takes a couple seconds for the marker to correctly disappear. It could be related to the issues I was having with triggers earlier, who knows. Thanks to @code34 for introducing me to deleteMarker.

 

Be sure the delay comes from your code.

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

×