Warcraft III resources & community, 2003–2006 · archived

Variables.

3 posts
#1

Variables.

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.
#2
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.
#3
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?