Jump to content
Sign in to follow this  
Zippy32

Make something appear on map

Recommended Posts

Hopefully a nice easy question, I've done a quick search but couldn't see an answer.

I want to make two markers appear on the map when a certain point is reached. How do I link the trigger to the markers? I've tried synchro, but it doesn't let me connect the trigger to the marker?

Thanks

Share this post


Link to post
Share on other sites

Put a marker on the map then change its coordinates to be off the map in the mission file. So it is there, but you cannot see it.

Trigger / On Act:

"MyMarker" setMarkerPos [12899.89,4457.31];

Put in coordinates where you want it to be.

Put something where you want it, look in the mission file using notepad to find correct coords...

So instead of creating a marker, you are just teleporting it to your position. Works for anything else too I think.

There are 3 sets of numbers in the coords. Use the first and last set, forget the second.

Edited by Tinker

Share this post


Link to post
Share on other sites

Does this work on units also?

Would it be possible to place a soldier on some remote part of the island and then teleport him to the location you want him to be, at the time you him to appear? Just like a spawn script?

Share this post


Link to post
Share on other sites
Does this work on units also?

Would it be possible to place a soldier on some remote part of the island and then teleport him to the location you want him to be, at the time you him to appear? Just like a spawn script?

I often use this method, just place them in a corner of a map (on land obviously) and then setpos them when/where needed. Seems to lag less than creating them on the spot as they were already made at the start of the mission.

Share this post


Link to post
Share on other sites

Then do you use setUnitPos instead of setMarkerPos?

A script-snippet would be much appreciated... :)

Share this post


Link to post
Share on other sites

For a unit you just use setPos (works the same as setMarkerPos for markers).

Share this post


Link to post
Share on other sites

Take a look at this.. this is a script that sets a marker on the player and follows him...

not exactly what you want. but it might help you understand how markers work better

_player = this;

// the name of the marker is the same as the player name

_name = format["%1",name player];
_plMarker = createMarker [_name, position player];
_plMarker setMarkerColor "ColorBlue";
_plMarker setMarkerType "Air";
_plMarker setMarkerText format["%1",name player];
_plMarker setMarkerSize [1, 1];
_plMarker setMarkerDir getdir player;


// Now update the Marker on the map
while {alive player} do 
{
_playerpos = getpos player;
format["%1",name player] setmarkerpos [_playerpos select 0,_playerpos select 1];
//adjust this for updatespeed
sleep 0.1; 
};

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  

×