As Requisted by one of our donars
In the event editor, there is the command change Variable, this guide will discuss the various uses and applications of variables
Click it and be presented with the option below
You can choose to change one variable, or MANY variables by using the range option (it's in the middle)
So you can change from variable 1 to 10 , or to 100, using the range function.
Next let's look at the set are where we have the most control and power.
You can set a variable to equal a number, or be added, subtracted, multipled or divided, I can't explain what modulo does, you don't really need it.
Now for the variauos uses,
Couinting the number of times you've done something, (ie killed monsters, talked to townspeople)
set a variable, (i.e. tutorial) and do it plus one. (notice the black arrows marking how to set it up)
and that's how you count things.
(If you want someone to give you potion for killing x amount of monsters)
set up a counting command for everymonster killed. Then put in the NPC's event
If Variable monster = 10 then
Msg: wow you killed 10 monsters! takea potion
add item:potion
then clear the event.
Making a random event, (I.e. dice rolling, roulette wheel or random music, or items)
Notice again, the black arrows mark the setup.
Making an event for dice rolling.
Have the intro Message, then have the player Input the desired number. Into a variable we'll call Player Choice. Then set a variable called Random choice to a random number between say zero and nine.
Then do an if function for if Player Choice = Random Choice then
Congrats you get whatever!
else
sorry you loose
Ok it should look like this!
You can also set a variable according to how many items you have on you or equipped,
According to what your hero's level is, or any of his stats,
Also you can set it according to an event's Map location (what map it's on) it's x or y coordinate, what direction its facing. and where it is in the window. (X or Y)
This is useful for say, a moving block puzzle
and Finally, you can set it according to How much money you have, seconds left in the timer, Number of party members, Number of times saved, Battles fought, Victories, Defeats, escapes, and song Postion.
Lets say you want Odin to appear in your main castle and give you the best sword after winning 250 battles.
Make a Event in the Town (not the castle, the town) let's put it in the door.
Then Teleport inside the castle.
Inside the castle let's put an auto event with the condition of Monsters killed being equal to or over 250.
Have him give a quick speach, thank the hero, give him the sword and clear the event.
Now for some theory..
With Variables, you can keep track of anything, count anything. You can build puzzles extrodinare.. It's very open.... So practice and experment and you'll be suprised what you can do