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

Variables.

Status
Not open for further replies.
Level 5
Joined
Aug 14, 2004
Messages
188
can anyone explain to me how to use variables, im honistly stumped on it, i know there used like X,Y,Z crap... but auuuhh.. . . yeah... ..still could use help with the rooting ability but that on (going to leave open to your imagin) guy locked it im not getting anymore help on it.
 
Level 2
Joined
Oct 1, 2004
Messages
15
Umm, not to sure what you want explained. Variables are based on the type of information you want stored. For text you would use a string, for whole numbers you would use an integer, for decimal values a Real number and so on.

To set a variable to a specific value in WC3 you need to create a trigger "Set Variable" action to modify its value.

As far as naming them, thats left up to the programmers immagination. I try to use a naming standard to help organize variables better. For example placing before names i_ for integers, r_ for reals and so on.
 
Level 5
Joined
Aug 14, 2004
Messages
188
so, how could i add in variables into a ability casted thing that fires off spawning and killing a diffrent unit unit, and subtracting lumber from the player?
 
Status
Not open for further replies.
Top