Jump to content
Sign in to follow this  
Kilo Zulu

Random location of unit and marker?

Recommended Posts

I've got a unit that is meant to appear somewhere randomly on the map. That's easy enough, but how do I get a marker to appear at the same location as the unit?

The idea is that the marker will be hidden until a certain objective is completed, and then it will show up on the map, letting the players know where the unit is located.

Thanks again! smile_o.gif

Share this post


Link to post
Share on other sites

You can't create markers on the fly so first you'll need to put it somewhere on the map and name it. Set it to type Empty and it will be invisible in game. When the marker should be visible, move it to the position and change it's type to something not invisible:

"MarkerName" setMarkerPos getPos unit

"MarkerName" setMarkerType "Destroy"

Marker types

Share this post


Link to post
Share on other sites
You can't create markers on the fly so first you'll need to put it somewhere on the map and name it. Set it to type Empty and it will be invisible in game. When the marker should be visible, move it to the position and change it's type to something not invisible:

"MarkerName" setMarkerPos getPos unit

"MarkerName" setMarkerType "Destroy"

Marker types

Thanks for that. I tried to plug it in before heading off to work this morning, but it gave me an error. Something about expecting a number. Probably a typo on my part, and I'll look at it in more detail when I get home this evening.

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  

×