yomaniac

Villager
Member
Joined
Sep 21, 2017
Messages
21
Reaction score
1
First Language
English
Primarily Uses
N/A
Hi, I have seen many tutorials for pressing switches in a specific order to open a door but I can't get any of them to work. I double checked to make sure I did everything the same but I still can't get it to work correctly. I am using RPG Maker MV for this. Can anyone help me out?
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,512
Reaction score
12,003
First Language
English
Primarily Uses
RMVXA
'Tech Support' is for when you cannot get the engine itself to work. "How do I...?" (implementation) questions belong in the Support forum for the engine you are using.
[move]RPGMaker MV[/move]

At the moment no one can help you as you haven't said exactly what you have done. The clearest and simplest way to do this would be to post screen shots of the event pages where you have done this. Show the whole page, not just the commands section on the right, as we need to see all the conditions and settings on the left as well. Please use Alt+PrtSc so that the shot is only of the active window, not your whole desktop. It makes it much easier to read.
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
44,120
Reaction score
15,529
First Language
English
Primarily Uses
RMMV
Agree. If you can't get them to work, then you haven't done them properly. And we can only help if we can see what you've done.

Post a link to the tutorial you're trying to follow, state what IS happening ("can't get them to work" doesn't explain much - what happens that you're not expecting?), and show us your events.
 

yomaniac

Villager
Member
Joined
Sep 21, 2017
Messages
21
Reaction score
1
First Language
English
Primarily Uses
N/A
Agree. If you can't get them to work, then you haven't done them properly. And we can only help if we can see what you've done.

Post a link to the tutorial you're trying to follow, state what IS happening ("can't get them to work" doesn't explain much - what happens that you're not expecting?), and show us your events.

Here is one of the tutorials I have tried to follow ,
the switches don't do anything and the door doesn't open. I am not sure what I am doing wrong my events seem to be the same as his but maybe I missed something. I don't think he explained the bridge/door event.
Switch1 1.PNG Switch1 1.PNG Switch 1 2.PNG Switch 2 1.PNG Switch 2 2.PNG Switch 2 3.PNG Switch 3 1.PNG Switch 3 2.PNG Switch 3 3.PNG Switch 4 1.PNG Switch 4 2.PNG Switch 4 3.PNG Switch1 1.PNG Switch 1 2.PNG Switch 2 3.PNG Switch 3 1.PNG Switch 3 2.PNG Switch 3 3.PNG Switch 4 1.PNG Switch 4 2.PNG Switch 4 3.PNG
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
44,120
Reaction score
15,529
First Language
English
Primarily Uses
RMMV
I don't have time to watch the video, but you're only using one variable and are changing it with each switch. I can't see how you can possibly tell the order of 4 switches with just a single variable, when you're resetting it on each switch.

I did make a "press the buttons in the right order" tutorial, which is in the tutorials forum, but the screenshots were all on photobucket so are not available. I'll see if I can redo them over the weekend and update it.

Do you want the player to have to turn on all 4 switches before they know whether they've got it correct or not? Or do you want all the switches to reset as soon as they make an incorrect move?
 

yomaniac

Villager
Member
Joined
Sep 21, 2017
Messages
21
Reaction score
1
First Language
English
Primarily Uses
N/A
I'd prefer if they press all 4 before they know if its wrong but either one is good.
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
44,120
Reaction score
15,529
First Language
English
Primarily Uses
RMMV
That's okay - as long as I know which way you want to go, I can make sure that's covered in the updated tutorial.
 

1158

Villager
Member
Joined
Oct 14, 2017
Messages
5
Reaction score
3
First Language
American
Primarily Uses
RMMV
1) Door
page1(Touch event)
closed door image
page2 : if key >=16(Parallel event)
key == 0
page3 : if key >=20(Touch Event)
opened door image

2) switches
page 1(Touch Event)
if (key == 0){key+=1} // so the next one on the chornological order would have the if condition set to 5, the other 10, and 15.
key+=4 // this one will tell how many buttons are pushed.
selfswitch a is on
page 2 : selfswitch a(Parallel Event)
if(key>=16)
self switch off
image of a pushed button

and on and on... I guess? if you insist with one variable this would work.

------------------------------------------------------------------------------
alright, so I tried my logic on MV... just to check if I hit u on the right way...
seems that the call event function doesn't really work smoothly as thought on selfswitches... but the logic is still solid so...
-------------------------------------------------------------------------
so I decided to hell with the call event function. will kinda lag.
 
Last edited:

yomaniac

Villager
Member
Joined
Sep 21, 2017
Messages
21
Reaction score
1
First Language
English
Primarily Uses
N/A
1) Door
page1(Touch event)
closed door image
page2 : if key >=16(Parallel event)
key == 0
page3 : if key >=20(Touch Event)
opened door image

2) switches
page 1(Touch Event)
if (key == 0){key+=1} // so the next one on the chornological order would have the if condition set to 5, the other 10, and 15.
key+=4 // this one will tell how many buttons are pushed.
selfswitch a is on
page 2 : selfswitch a(Parallel Event)
if(key>=16)
self switch off
image of a pushed button

and on and on... I guess? if you insist with one variable this would work.

------------------------------------------------------------------------------
alright, so I tried my logic on MV... just to check if I hit u on the right way...
seems that the call event function doesn't really work smoothly as thought on selfswitches... but the logic is still solid so...
-------------------------------------------------------------------------
so I decided to hell with the call event function. will kinda lag.
I am kind of confused about the events, can you show me screenshots?
 

1158

Villager
Member
Joined
Oct 14, 2017
Messages
5
Reaction score
3
First Language
American
Primarily Uses
RMMV
Doorpage1.jpg Doorpage2.jpg Doorpage3.jpg SwtichPage1.jpg switchpage2.jpg
I'm not sure if I'm allowed to spam this with images like this but lol
It's in Korean so I added some notes on the way. Page 2 of each events are "Parallel" in case you can't read them.
 

yomaniac

Villager
Member
Joined
Sep 21, 2017
Messages
21
Reaction score
1
First Language
English
Primarily Uses
N/A
Sorry but I still cannot get this to work properly, the switches don't reset properly and the door never opens.
 

Attachments

  • 1.PNG
    1.PNG
    124.4 KB · Views: 11
  • 2.PNG
    2.PNG
    125.1 KB · Views: 11
  • 4.PNG
    4.PNG
    129 KB · Views: 11
  • 5.PNG
    5.PNG
    124.2 KB · Views: 11
  • 6.PNG
    6.PNG
    127.4 KB · Views: 10
  • 7.PNG
    7.PNG
    67.4 KB · Views: 10

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
44,120
Reaction score
15,529
First Language
English
Primarily Uses
RMMV
According to your screenshots, the player needs to flip the switch on event 3, then event 2, then event 5, then event 4, to get a 3124 sequence. Is that what you are intending? And they have to actually walk up to the gate in order for it to open - it doesn't open on its own after you flip the last switch. If you want it to open on its own, then you need to give it 2 pages. The first page will be the gate closed, and the second page will be the gate opened, and will be conditioned by the switch you turn on in the common event.

If you're not sure you have the sequence correct, you could put a Show Text command with \v[14] in it at the start of the common event, and it will tell you what the sequence is as you flip each switch. A good debugging technique that is easy to remove once you've got it working properly.

Also, I'd uncheck the Stepping Animation boxes. In this case they do nothing, but if you had different coloured switches in the different columns of the spritesheet, it would make them cycle between the colours even when the player isn't interacting with them.

I assume the second page of each of your events is just the switch in the 'on' position and self switch A as a condition?


If it makes it easier for you, you could just change the numbers you are adding to the variable, to be the event id (so event 3 will add 3 to the variable, event 4 will add 4 to the variable), and then you can change the sequence in the comparison in the common event to represent the event numbers. You can only do this because your 4 events all have ids less than 10.
 
Last edited:

yomaniac

Villager
Member
Joined
Sep 21, 2017
Messages
21
Reaction score
1
First Language
English
Primarily Uses
N/A
Yes you are right about page 2, the door now opens when I put in the correct code, but I'm just wondering if the reset is correct. When the player enters a wrong order 3 switches go back up and 1 stays permanently stuck down, I don't think its supposed to be like this.
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
44,120
Reaction score
15,529
First Language
English
Primarily Uses
RMMV
Your reset event looks correct. The switch events are 2, 3, 4 and 5. I'm assuming you've got the map id correct - if it wasn't, NONE of the switches would reset.

Is it the same switch that stays down every time? Could you check page 2 of that event and make sure it's correct - make sure it's got the right conditions? Maybe post a screenshot of it here if you can't figure it out.

Do you have any plugins?
 

Kiryuu

I'm a peace of sheet
Member
Joined
Oct 22, 2017
Messages
14
Reaction score
1
First Language
english
Primarily Uses
RMMV
Try this one. the second page of each switches are like this,
yVqktZp.png

except the conditions are the switch's respective number
 

Attachments

  • 1.png
    1.png
    235.9 KB · Views: 7
  • 3.png
    3.png
    257.6 KB · Views: 6
  • 4.png
    4.png
    257.5 KB · Views: 6
  • 5.png
    5.png
    257.7 KB · Views: 6
  • 6.png
    6.png
    257.6 KB · Views: 6
  • 7.png
    7.png
    273.3 KB · Views: 6
  • 2.png
    2.png
    277.7 KB · Views: 6

yomaniac

Villager
Member
Joined
Sep 21, 2017
Messages
21
Reaction score
1
First Language
English
Primarily Uses
N/A
I have a few Yanfly plugins and a flashlight plugin. If the wrong order is put in then 3 switches reset and the other one can't go back up until i press another switch but then another switch can't go back up.
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
44,120
Reaction score
15,529
First Language
English
Primarily Uses
RMMV
@Kiryuu I do not understand any of those events. Why are you sometimes *= 3, sometimes += 2, sometimes -= 2? That doesn't seem consistent, and without any explanation of what you're doing and why, it's very confusing.

@yomaniac you could try using regular switches instead of self switches.

When I asked if you were using plugins, I kind of wanted to know WHAT plugins you were using. "A few Yanfly plugins" doesn't tell me if any of them could be interfering with the events.
 

Kiryuu

I'm a peace of sheet
Member
Joined
Oct 22, 2017
Messages
14
Reaction score
1
First Language
english
Primarily Uses
RMMV
@Shaz It was a way of making a ordered switch puzzle
switch 1 multiplies the variable B by 3
switch 2 subtracts 2 from the variable B
switch 3 multiplies the variable B by 2
switch 4 subtracts 1 from the variable B

From the first event, i set variable B to be equal to 2 at start.
To unlock the door, variable B has to be equal to 8.
the only way to get 8 with those operations is activating the switches in this order: 1, 2, 3, 4
2 * 3 = 6,
6 - 1 = 5,
5 * 2 = 10,
10 - 2 = 8

the other variable, where all the switches just do: variable 0001 = var 1 +=1,
is for getting the data that the player has activated all the switches.
if var 1 = 4, it resets all switches.
hope that makes sense.
 

yomaniac

Villager
Member
Joined
Sep 21, 2017
Messages
21
Reaction score
1
First Language
English
Primarily Uses
N/A
@Shaz I'm using the yanfly party system and region events and a plugin called soul mv lantern effect.
 

Latest Threads

Latest Posts

Latest Profile Posts

Remember when people had the ability to have meaningful conversations on platforms like twitter or facebook? Good times... Nowadays is absolute crap.
All aboard the Advent calendar train, riding Avery's coattails as an excuse to make more sprites. ;)
Advent2021-01.gif

Get 'em in my thread in General Resources.
I had a dream where it was Friday, and what happened in the dream was irrelevant, because I woke up and it's not Friday, so I'm sad.
edit: third time's the charm? some graphic text I whipped up that I like for the mid-game intertitle, now with all of the actual letters in the stupid damn words I was trying to spell :uswt2:
kcsmall.png

Forum statistics

Threads
117,097
Messages
1,104,546
Members
153,110
Latest member
Sanerefusal
Top