• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

Referencing preplaced units/items in JASS

Level 6
Joined
Jul 3, 2006
Messages
102
How do I go about referencing preplaced units in JASS code?

I know that when using a preplaced unit/item in a GUI trigger, WE automatically creates a gg_ variable for it, which can be used to reference this unit. But what if there are no GUI triggers? The only place where this unit can be set to a variable is when it is created:
JASS:
set u = CreateUnit(p , 'U007' , - 1708.6 , - 1267.4 , 277.550)

And since this code is generated and overwritten by WE every time the map saves, it cannot be used to store this into another variable!?
 
Last edited:
Back
Top