Jump to content
Sign in to follow this  
Bioz

Let a marker appear ONLY when a trigger is activated

Recommended Posts

Hey guys I didn't find a good topic for this issue. I want that a marker appears ONLY when a trigger is activated. Thanks.

Share this post


Link to post
Share on other sites

if you have a tank named tank when it's destroyed the trigger would go off placing a marker on the target.

trigger setup

con

 !alive tank

ona ct

hint "tank destroyed!!"; marker = createMarker ["Destroyed",getpos tank];marker setmarkertype "DestroyedVehicle";marker setmarkersize [5, 5]; marker setMarkerColor "ColorRed"

you can also just place them on the map from the editor

set it to 0 for invisible and change to 1 when you want to see it. "destroyed" would be whatever you name your marker

"Destroyed" setMarkerAlpha 0;

Share this post


Link to post
Share on other sites

Put few markers on map, give them names m1,m2 etc.

In init.sqf write:

"m1" setmarkersize [0,0] 

etc.

And in triggers write some conditions and then use:

"m1" setmarkersize [1,1]

Wenn mission starts all markers with [0,0] will be invisible, after trigger activation markers will show on map.

Check also: setmarkercolour and setmarkertext.

Share this post


Link to post
Share on other sites
Put few markers on map, give them names m1,m2 etc.

In init.sqf write:

"m1" setmarkersize [0,0] 

etc.

And in triggers write some conditions and then use:

"m1" setmarkersize [1,1]

Wenn mission starts all markers with [0,0] will be invisible, after trigger activation markers will show on map.

Check also: setmarkercolour and setmarkertext.

That's a horrible way of doing it, if the marker have text the text will still be visible.

Use setMarkerAlpha instead.

Share this post


Link to post
Share on other sites

@cuel

"Its not horrible way of doing it"

First you put marker without any text on map with [0,0]. And in trigger when you show the marker on map you add text to any marker you want with setmarkertext command. So on mission start you dont have any visable text. ;)

Share this post


Link to post
Share on other sites

Then why not just use setMarkerAlpha and save you the trouble of setting the text?

Share this post


Link to post
Share on other sites
Then why not just use setMarkerAlpha and save you the trouble of setting the text?

could you please expand on this? So in trigger I put "markername"setMarkerAlpha 1; in Act and in the INIT. file "markername"setMarkerAlpha 0. And once trigger is hit marker shows?

Share this post


Link to post
Share on other sites
could you please expand on this? So in trigger I put "markername"setMarkerAlpha 1; in Act and in the INIT. file "markername"setMarkerAlpha 0. And once trigger is hit marker shows?

Exactly.

Share this post


Link to post
Share on other sites

Browsing these forums sometimes I stumble on fantastic solutions!

---------- Post added at 10:39 PM ---------- Previous post was at 10:07 PM ----------

There is another command - setTriggerArea

The combination of setMarkerSize and setTriggerArea can be very powerful!

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  

×