following a set way to activate a switch, how?

Skydorm

Villager
Member
Joined
Oct 28, 2016
Messages
20
Reaction score
2
First Language
German
Primarily Uses
I want to create a path to activate a switch that deactivate a trap. So if the player start at 1 he have to walk the red line to get to the next point 2 and then he walks to point 3 and if he followed the lines exactly, a switch should go on to deactivate a trap. I want to reset the way if he goes a other way then the set way, but i don't know how to do it or if it's possible. I also looked for a plugin but i didn't know how to call it.

My Problem: I don't know how to do a event that get triggered when the player follows a set way and if the player leave this way then the progress will deleted and he can start new

 

Rubescen

Veteran
Veteran
Joined
Jan 4, 2016
Messages
156
Reaction score
174
First Language
English
Primarily Uses
RMMV
There are definitely more elegant solutions for this with plugins/scripting, but you can do this using just the core engine as well by making use of regions.

Here's a picture example to give you the basic idea:
PathwaySwitch.png

You need a parallel event checking the player's region. Then some sort of condition that flips switches off, if the player moves from the region after flipping the switch. The switches themselves are pretty basic, but just need to update as each new switch is flipped following the path.

Hopefully this helps you get it working.

Edit: also, you don't actually need there to be 2 different regions. All of that could just be region 3, and it would work as well.
Edit 2: Also this RMW blog post might be helpful as it covers many of the same concepts: http://blog.rpgmakerweb.com/tutorials/tutorial-using-regionid-in-events/
 
Last edited:

Skydorm

Villager
Member
Joined
Oct 28, 2016
Messages
20
Reaction score
2
First Language
German
Primarily Uses
Thanks for you help it works with the first button but i've some problems with the others, because if i want to set yellow button and Green button i can go directly to the green button and it's active, or no button works instead of red . I'll try to find out for myself how to make the buttons work, but if it does not bother you, I'd be happy for your answer
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
You could use this, with some adjustments:

https://forums.rpgmakerweb.com/inde...-press-buttons-in-correct-order-puzzle.70966/

Instead of switches that have to be pressed, the 'triggers' will be Player Touch events set to Below Characters.
Instead of calling the common event when each 'trigger' is activated, remove that from the individual events, and put it on the actual switch you want the player to activate.
You'll also need a way to allow them to go back to the start and reset the puzzle, in case they walk over the switches again on the way back.

Although, thinking about it, this would not force them to follow the path, moving between the arrows in a direct line. They could walk all over the place, as long as they touched the arrow tiles in the correct order. So maybe not what you were after ...
 

Rubescen

Veteran
Veteran
Joined
Jan 4, 2016
Messages
156
Reaction score
174
First Language
English
Primarily Uses
RMMV
@Skydorm You should use the same set up for each switch in the sequence that I have above, with some slight tweaks.

E.g. For the second switch. It should have a page where it is blank/unactivated. A page when switch one is turned on, with a command to turn on switch 2 when the player touches it, a page with switch 2 on (and nothing happens -- since the parallel process is determining whether or not the switch should be flipped off), and a page with the Switch 3 on, which makes it so it won't reset after the player reaches the end.
 

Skydorm

Villager
Member
Joined
Oct 28, 2016
Messages
20
Reaction score
2
First Language
German
Primarily Uses
Thank you guys for taking your time to help me, it works now! Just had to put the " If Switch 2" into "If Switch 1".
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD

Forum statistics

Threads
105,868
Messages
1,017,072
Members
137,578
Latest member
JamesLightning
Top