• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

A Respawn Function - Is this possible?

Status
Not open for further replies.
Level 3
Joined
May 3, 2004
Messages
46
Found a map with a easier system, so feel free to remove this thread.
( http://www.clancbs.com/downloads_seperate.php?id=563 )
--------------------------------------------------------------------------
Long story short;
I was wondering if there is any way of somehow reach a units ID via triggers? And then I don't mean the Unit-Type ID,
When you place units on your map, they all achieve a kind of ID or sub-ID, like "Footman 0033" etc, and is it possible to somehow use the "0033" in Arrays?

The Respawn Function is that during the Map Initialization, all units will be saved to two variables, Unit_X and Unit_Y. Where X and Y is the coords of the units starting position, and then it bothered me - how the heck do I give all units an unique value that I can use? If there's any other way of storing many units coordinates, then it'd be pretty easy to make a respawn system that spawns the units in their original position.

If there's a thread about this already or if there's any other way/system, please post links. :)

(Hmm, if I posted this in wrong section, feel free to move it)
 
Last edited:
Status
Not open for further replies.
Top