I have feelings that I have to use variable.
but the thing is ... I don't have a clue on how to use them.
I already read tutorials, video tutorials on youtube, but I think I'm too dumb to understand what exactly is variable and how it works.
so I'll just ask this, ..
the main character should talk to several people to continue the game.
I imagine I have to store variable points, so after talking to those people,
the next event will triggered and the game could go on.
but how? what should I do?
please help and thank you
Each person has a dialogue bit. Then, a condition that says if Self Switch A (or whichever Self Switch you want to use) is Off, add 1 to the "talk to everyone" variable, and set Self Switch A to On.
Whenever the "talk to everyone" variable reaches the right number, commence the plot. 🙂
Use change variable command to add variable by 1 after talk. Each event (npc) should have;
First Page:
- Conversation as wish
- Add variable by 1
- Self Switch A on
Second Page (set Self Switch A ON):
- Same or new conversation
After that set the event that makes story progress further to check if variable is equal to your designated value, do something.. If not, do nothing.
Actually, do you need that conditional? It just adds another layer of complexity which I don't think is required.
Set Variable and NAME IT (always name your switches so that you don't accidentally use them again for something else) to whatever you want e.g. 5. Let's say it is Variable #2
NPC
Dialogue
Variable #2 In the 'Operand' click 'Add'. Put 1
Self switch A
Ninja'd by a micro-second
I chose to use that Conditional to make things a little simpler - seeing as there is (as yet) nothing MORE complicated in the individual Event than checking whether or not the player's spoken to the NPC, having a second Event Page is rather unnecessary.
Now, if the NPC was to have a wildly different range of responses and actions after being spoken to the first time, sure, use a second Event Page, but so long as there's just a variable and a self switch once, a single page will do - and the Event can be copied to all the other NPCs, only needing a name change (for organization) and a replacement of the dialogue.
And as such, you need the conditional to avoid speaking to only one NPC for ALL the NPC needs. 😛
To clarify: a variable is a place holder for a value, the value can be whatever you want it to be. This is just like in math class when you are looking for X; in that case X is a variable representing some number.
In terms of RPG maker you would use variables to represent some value needed to keep track of for further use, usually to trigger something else later when a specified value has been reached. In this case you want the variable to represent "people talked to" (the others already explained how to go about doing this).
-You can change variables by adding a set value, subtracting, or setting it to a specific value, etc...
-Also you can set it so events can trigger only when the variable has passed a certain value, (you can do this in conditional branches as well) this includes autorun and parallel process events as well.
-You can do a lot of neat things with variables so they are definitely worth experimenting with, you can call a common event from a skill and set a variable equal to the party's gold then change hp equal to that variable or you can make a skill that calls a common event that forces a character to use different skills depending upon the value of a variable.
thanks a lot for the guidance, guys.
by trying, I understand a bit about variable now.
but it seems like the event won't trigger.
here's the trigger, I wonder if there's something wrong with this.
[IMG]https://fbcdn-sphotos-e-a.akamaihd.net/hphotos-ak-xft1/v/t1.0-9/1510574_10153302603853069_3916129224797286897_n.jpg?oh=4961638f8056081b810baacaf61d98a6&oe=55D60B69&__gda__=1443591432_3fb9f69d89f65530316e6fa1c92d3324[/IMG]
this is the NPC script which the character should talk to
[IMG]https://scontent-sin.xx.fbcdn.net/hphotos-xpa1/v/t1.0-9/11257894_10153302612808069_7634416453389420934_n.jpg?oh=777379af6e76f25c4c8adf81d89bdeee&oe=55FF4749[/IMG]
I'm not clear what you mean when you say that the event "won't trigger".
Your conditional is checking if the variable is 4 or more.
If it is some dialogue happens and a control switch is turned on.
If it is not, then some dialogue happens.
What is it that is not triggering?
I'm guessing that perhaps the problem is that nowhere on this event do you add anything to the variable, so if it is less than 4 at the beginning, that is what it is at the end.
I know it's not triggered and the switch I need to go on is not turned on because of the dialogue.
the general keeps saying the dialogue where he waiting the player to talk to certain people.
so you suggest to use "less than" than "greater than" ?
okay let me try...
-------------------
nope. doesnt work.
I'm sure that the related variable are added.
I add to 5 people, while the requirements are 4 or more.
but still none.
*add baloon icon
*this poster
*cobweb
It appears, I made wrong variable formula in some people.
the event works well now. thank you very much Warpmind, Murd, ksjp17, Vox Novus for all the help.
this threat might close now.
[IMG]https://scontent-sin.xx.fbcdn.net/hphotos-xta1/v/t1.0-9/11265475_10153302766093069_3320604135233018362_n.jpg?oh=2e87c77a66002fc4b0846406de076ea0&oe=560D7DEA[/IMG]
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.