Ill see what I can do.
Event A simple container that can have a graphical display
and a preset set of commands triggered when it should.
For example, on hero touch, on event touch, on action key.
SwitchA stored BOOLEAN. A switch can have only 2 values
(Actually 3, but lets say 2) : 1 or 0, true or false, on or
off. These switches are effective throughout the game. So,
Switch 1 from event 10 set on, will also be on in event 11.
Local SwitchThe same as switch, however, only works in the event
container they are created. So, local switch A from event 1,
will not effect local switch A from event 2.
Page2 pages are acutally 2 sets of commands. An event can have a
preset set of commands, with pages, an event can have more then
1 preset set of commands, with one active at the time though.
Also, if more then one page's pre conditions are met (stated in
the left upper part of the event window) the page with the highest
number will be executed.
Pre-ConditionThese condition(s) must be met before an event's page (command list)
is excetuted. When not met, the page will be ignored. Ex. Swith 1 on
When Switch 1 is off, the page will not run, when it is on it will.
Variable A container that can hold pretty much anything. This goes from
numbers to plain text aswel as other data. It could also hold
true and false like a switch.
Common EventAn event (container with preset set of commands !
) without
graphical display. Usually used for sets of commands that need
to be executed more then once.
You can skip this:I don't know if you want to know, however, the switches are
stored in $game_switches; the variables in $game_variables; the
local switches in $game_self_switches; the events in $game_map.events;
the common events in $data_common_events.
So... what can they mean for each other? Well, we could go with examples. Let's say we have Mikey. Mikey is a boy, he is desparatly in love with Jessica. Now, he wants to bring Jessica an apple. This apple could be obtained by Grandpa and his aplletree. How would we do this? It can be done in some ways, but we will be using pages, local switches, switches, events and one common event.
We start with an event for Grandpa. Let say we want him to say: Hello Mikey. To get an apple, go to the tree and rumble it hard. You might need to do it more then once though.
@>Text: Hello Mikey. To get an apple, go to the tree and
: : rumble it hard. You might need to do it more then
: : once though.
This is what we got. Okay. Now we make an event for the tree. We ONLY want to be able to ruble the tree, after we talked to grandpa. This means we need to use switches. If you want to know what kind, think again. Does the event's variable need output from another event? If yes, switches, if no, local switches. The answer is yes. You need to talk with grandpa (is another event) to activate the tree.
So, we make 2 pages. Why? One with the graphic of the tree and a message saying: Look, a ginat apple tree. One (needs to be the second) with the graphic of the tree and a precondition checking if a switch is true if yes... well, we deal with that later.
Page one Appletree:
@>Text:Wow look, a giant appletree!
Page two Appletree:
Nothing yet...
If you test your game you will see that when you talk with grandpa he keeps saying the same thing, and when you talk with the tree, nothing happens. We wwant to fix that. Okay, first the tree. Both pages are equally the same, except for one having text. This means that both pages are actibated (read: preconditions. In this case all the pages preconditions are met) so the page with the largest number (read: page) will be exceuted, being the one without the text.
Go to the second page of the appletree. At preconditions find: Switch [...] is ON. Click the [...] and choose a switch. We call it switch APPLE for the sake of this tutorial. When you test the game, you will see that grandpa says the same text whle the time, and the tree will say the same text too. Okay, how to activate page 2?
Go to grandpa and add Switch Oparation: Switch[APPLE] = on.
@>Text: Hello Mikey. To get an apple, go to the tree and
: : rumble it hard. You might need to do it more then
: : once though.
@>Control Switches: [0001: APPLE] = ON
Yay, let's test it again!. Okay, after talking with grandpa, the tree stops saying its text. So that worked. Now we want an apple. Grandpa told us we might need to ruble more then once. So we need to rumble 4 times.
Make a new common event, name it RUMBLE and add an event: Variable Operation: Add 1
@>Control Variables: [0001: TREE] += 1
So. Every time we run this common event, variable 1 will be upped with one. Now go back to the tree, and in page two add: Call common event: Common Event 1
@>Call Common Event: RUMBLE
(Testing the game will do nothing now)
Make a thirth page in the TREE event. In its pre condiitons selct the [...] after Variable and select variable TREE (number one I guess). In the with space below, make the number 4. This means this page will run when variable TREE is 4 or more. Exactly how we want it. In that page, add: Obtain item Apple, also we want this only once to happen, so add: Set local swith A to on, make a fourth page: preconditions Local switch A is on.
@>Change Items: [Fruit] += 1
@>Control Self Switch: A = ON
There, this is how far I am going to help you. So what do we got?
We have Grandpa. One page, no preconditions. He says something, and makes a variables true.
We have The tree. 4 pages:
Page 1: No preconditons, says text
Page 2: Switch from grandpa needs to be on: Calls Common event
Page 3: Variable needs to be 4 or more: Adds item + Local switch on
Page 4: Local Switch A on: Does nothing.
Common Event: Adds 1 to a variable.
So, why did we use a variable for the grandpa <=> tree, becuase it need to be interacted between more then 1 event. Why did we use a common event (hello, normally you would jsut place the oparation in the event. There ws NO NEED for a common event, just wanted to show how they work), becuase we would need to exceute a long (cough) oparation more then once. Why did we use a variable? To store anything other then true/false, in this case a number. Why did we use a local swithc in the tree? Because it could all be handled in the three itself.
I hope you understand