• 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 3
Joined
Jul 28, 2006
Messages
40
Ok,before I say anything,I will just say that I read tutorials,but I didn't understand a thing...can someone help me understand variables?thx in advance
 
Level 8
Joined
Jan 18, 2007
Messages
331
ok il try=))

a variable is used to store a certan thing like the last created unit/buff/animation.
Variables are helping we to understand that a specific unit is selected with triggers and its going to be a part of a trigger. FEX: you trigger so a footman shuld get spawned at region 100. then to select the unit (wich you cant without a variable) you set a unit variable to be the last created unit(in this ex its the footman) then the we selects this unit and stores it in a frorm of cache. NOTE! to make this work you have to set the variable next to the unit. To make this more easely understandig: if your going to create 3 animations a variable has to been used so you can edit and shut down the right animation. the variable name has nothing to do with the variable. To store a unit you enter the name you want the variable to have(does not infect the result) and then chose a variable type from the list. then if your going to have more than one unit use arrays(wen you use arrays you will have to set an index for eatch stored unit) in this way you will decrease the potentional dis order that can happen if you got allot of variables for the same trigger. IF you have any questions then im glad if you can send me a private message.
 
Last edited:

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,259
sonkan1, that is hardly a very good description.

It was all packed together, hard to read and did not explain the types clearly.
It also did not include locals.

If you want rep, make a 1000+ word tutorial if you are soo keen to write about vairables.

Topic creator, you make no sense, please repost more clearly.
 
Level 3
Joined
Jul 28, 2006
Messages
40
sonkan1, that is hardly a very good description.

It was all packed together, hard to read and did not explain the types clearly.
It also did not include locals.

If you want rep, make a 1000+ word tutorial if you are soo keen to write about vairables.

Topic creator, you make no sense, please repost more clearly.

Ok,here is something more clearly:I do not know when and how to use variables...For example,if I make a TD I don't even know how to make the leaderboard show how much units a ppl has killed...
sonkan,I know what you mean,I read something like that in the tutorial...anyway I read Ralle's tutorial and didn't understand it...
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,259
Paul47, I am sorry for the confusion.
I was replying to Sonkan1 who PMed me for rep for that one post and not at you, sorry for deviating from topic.

The basics
A variable stores something
They can also reference something like a unit, theses are called handles
They can be made in 2 ways, one is by global, two is by local (jass) but for your sake, use globals.

4 main types are
String
Handle
Integer
Reals

Thats the basics, hope it helps
 
Level 3
Joined
Jul 28, 2006
Messages
40
So can someone help me understand them?if you have yahoo messenger ID or msn it would be great!...please reply ANYONE!
 
Status
Not open for further replies.
Top