• 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.

Variable Help

Status
Not open for further replies.
Level 8
Joined
Sep 15, 2006
Messages
426
Yes. Use the action Set Variable. Set the first field to your variable, and for the second field, click the Select Unit button. This will take you to the editor screen. Click the unit you want to use, and you're done.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
It is impossiable for a Variable to become a unit. It is like saying I would like this pile of wood to become steel.

However, A Variable can refer to a unit that was made eariler, eithor by the WC3 engine or spawned by triggers. To do that you will have to use a unit variable which is a type of handle variable and then set it to the unit you want to refer to.

To refer to units you placed in the World Editor you have to use the preplaced unit option when using a action that refers to a certian unit in GUI. From that you can then use the genericly created variable in your JASS scripts if you need to.
 
Status
Not open for further replies.
Top