Actingman00
Member
Anyone have a tutorial or can explain them to me? That would be great
Thanks.
Thanks.
I kind of get it, but how does the game know what it is supposed to be counting? I didn't really see that, unless I'm just blind :pBrewmeister":3n846m7y said:Here's a response to the "What's a variable?" question I posted at Amaranthia.com....
(originally posted here, but the image link is broken, and it's closed.)
From a beginning programming manual:
A variable is used to hold data within your program. A variable represents a location in your computer's memory. You can put data into this location and retrieve data out of it. Every variable has two parts, a name and a value. (NAME = value)
Think of a variable as a yellow sticky note (Post-It).
Let's say you want to keep track of the number of times your sister says the word, "like".
On the top of your sticky, write in pen "Sister_Like". THis is the NAME of our variable.
Put a big black line under it.
Now in pencil, write "0" on the bottom part.
http://home.comcast.net/~bridge161/sister_like.png[/img]
Now, everytime your sister says, "Like", erase the number, add 1, and write the next number.
([0001: Sister_Like] += 1)
At any time, you can check the value to see how she's doing. Just look at the note NAMED: Sister_Like
Now let's say you have a rule... every 100 times, she needs to be slapped!
You could use the logic in your program:
@>Conditional Branch: Variable [0001: Sister_Like] == 100
. @> Call Common Event: Slap_Sister
. @> Control Variables: [0001: Sister_Like] = 0
:
@>
Does that help? Too simplistic? Or were you looking for a more technical explanation?
Be Well