Pages: 1
Topic closed
I've heard many thing on 'Variables', and I've never understood what they were exactly. I've read another forum that used a Variable, but I couldn't do it. I followed the directions and everything and I just never understood. So I'm asking, what IS a variable and how do I use one?
Offline
http://scratch.mit.edu/forums/viewtopic.php?id=1346
Offline
basicly, a variable holds any value (usually numeric). This value can be changed, and accessed easily. For example, if i had a variable called myVariable, and i gave it a value of 1. if I then ask a sprite to say the variable, it will simply say one. variables are often used with gravity. So lets called our gravity variable grav. if i say:
forever
change [grav] by 1
change y position by [grav]
it will give it the illusion of acceleration (remember to set grav back to 0 though if you want to stop accelerating)
Offline
Topic closed
Pages: 1