• 🏆 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!

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,202
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