Jump to content
Sign in to follow this  
silly_ghillie

How to make a marker disappear after no enemies are left

Recommended Posts

I want to make a marker disappear from the map and be replaced by another once all enemies have been killed in a certain area of the trigger.

I am not the best in scripting so please ignore my dumbness

Thanks

Silly_Ghillie

Share this post


Link to post
Share on other sites

Like I said, I am not good in scripting and JUST want the marker to disappear and I don't want a bunch of code that I cannot figure out without consulting the Holy Bible or something

Share this post


Link to post
Share on other sites

Select marker make it ellipse or rectangle.

with say a hatch pattern and color red.

Then set the size and name it Area1

Set your trigger as follows

size and shape to match that of marker

Opfor notpresent repeating

in the on act box put

"area1"  setMarkerColor "Colorgreen";

in deac

 "area1" setMarkerColor "ColorRed";

When you play the marker will be green if there is no opfor or red if there is.

Share this post


Link to post
Share on other sites

Another trick is to use markers on an identical position and use the setMarkerSize statement in the trigger to alter the size of the markers. For example one might wish to alternate between the flags of two warring parties:

(1) Place a marker named flag1 on the map.

(2) Place a second marker named flag2 on the map and move it so it covers the first one, then set the size of the marker to 0 and 0.

(3) Place a trigger including in the on activation field:

"flag1" setMarkerSize [0,0]; "flag2" setMarkerSize [1,1];

This will ensure that the flag displayed on the map will change from the one to the other.

BIS Wiki entry on setMarkerSize

Regards,

Sander

Share this post


Link to post
Share on other sites

Wow this is fabulously useful!

Thank you!

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  

×