Help with puzzle section

OK so I'm thinking of doing a puzzle for my test game.


I want an event that says something after a 'specific number of events' are interacted with but 'won't say anything' or 'says something different' if the player haven't interacted with all of the involved events.


Example:


There is an NPC event that will say to the player: "Pick up both items"


If the player only interacted with one event(any) the NPC event will say: "Are you deaf?"


If the player interacted with both event the NPC event will say: "Good Job"


I don't know if this has been asked a couple of times already but I find it hard to google this. Thanks in advance.
Switches, my friend! Look for tutorials.


(in my sig or in the list or tutorials)


basically, when you pick up one, turn on switch one


when you pick up number two turn on switch number two


when you talk to the guy, make the page only answer "good job" if both switches are on. =]
Switches, my friend! Look for tutorials.


(in my sig or in the list or tutorials)


basically, when you pick up one, turn on switch one


when you pick up number two turn on switch number two


when you talk to the guy, make the page only answer "good job" if both switches are on. =]

I'm thinking conditional branch because it acts like an "if" function, but it only allows me to put one condition at a time without having my own script(at least what I'm aware of).


Any workaround on that?


Edit: Also there's only two conditions per event. I might do it on more than 2 switches/events in the future.
@GrandmaDeb OK I might have solved my problem with 'control variable'.


I gotta do this stuff when I'm not half asleep lol.


I'll report back If I encounter any problem. Thank you @GrandmaDeb.
This seems like it would work best with a variable, especially if you have more than two things the player will interact with. Assign a variable to the event. Add 1 to the variable each time the player interacts with the other events. Set pages on the main event to trigger when the variable reaches a certain number. E.g. variable = 2 - "Try again" etc
This seems like it would work best with a variable, especially if you have more than two things the player will interact with. Assign a variable to the event. Add 1 to the variable each time the player interacts with the other events. Set pages on the main event to trigger when the variable reaches a certain number. E.g. variable = 2 - "Try again" etc

Thank you. I did exactly this and it worked fine.
notmexicanjose, please avoid double posting, as it is against the forum rules. You can review our forum rules here. Thank you.


You might want to have a look at Celianna's excellent tutorial on using variables.
Thank you. I did exactly this and it worked fine.



This is an incomplete solution. After the player interacts with the event with the variable, you need to do something so that you cannot activate the event again and have the variable increase again. Otherwise, for example, you could talk to the same person ten times instead of talking to each of ten people.


So **do check the tutorials.**
This is an incomplete solution. After the player interacts with the event with the variable, you need to do something so that you cannot activate the event again and have the variable increase again. Otherwise, for example, you could talk to the same person ten times instead of talking to each of ten people.


So **do check the tutorials.**



I would imagine that would be easily solved by having the target event turn on a self-switch to an empty page once the player is done interacting with it. I do agree, though, that reading up about variables and eventing in general would be helpful.

Original thread: https://forums.rpgmakerweb.com/threads/help-with-puzzle-section.71076/