• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

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