So what I am trying to do is make a puzzle system in my game where when a player touches 4 set events each one that is touched is a different color but I am having difficulty on how to sort of link the switches?
Any ideas?
Any ideas?
It's supposed to trigger a door to spawn if the puzzle is triggered in the right order.
maybe i could use a variable to link them
Event #1
If Switch #1 is Off
If Switch #2 is Off
If Switch #3 is Off
If Switch #4 is Off
Turn on Switch #1
Else
Cue that puzzle is being reset
Turn Switch #1 Off
Turn Switch #2 Off
Turn Switch #3 Off
Turn Switch #4 Off
End
End
End
End
Event #2
If Switch #1 is On
If Switch #2 is Off
If Switch #3 is Off
If Switch #4 is Off
Turn on Switch #2
Else
Cue that puzzle is being reset
Turn Switch #1 Off
Turn Switch #2 Off
Turn Switch #3 Off
Turn Switch #4 Off
End
End
End
End
Event #3
If Switch #1 is On
If Switch #2 is On
If Switch #3 is Off
If Switch #4 is Off
Turn on Switch #3
Else
Cue that puzzle is being reset
Turn Switch #1 Off
Turn Switch #2 Off
Turn Switch #3 Off
Turn Switch #4 Off
End
End
End
End
Event #4
If Switch #1 is On
If Switch #2 is On
If Switch #3 is On
If Switch #4 is Off
Turn on Switch #4
Open Door
Else
Cue that puzzle is being reset
Turn Switch #1 Off
Turn Switch #2 Off
Turn Switch #3 Off
Turn Switch #4 Off
End
End
End
End
so i've got this all in now but when i try to run it the door does not spawn. that was before i specified the switches locations but when i did specify them the blocks that were the foundation for the switch disappear as soon as i load into it
Shaz (who is a whole lot smarter than me) has a very valid question. My approach assumes you are resetting the puzzle immediately. If you want to touch all 4 before the check is made, then a different approach needs to be used. Probably using a little bit of js to concatenate a string, as in "1234" or "3214" and then checking if the order was "1234" but that's up to you.
Original thread: https://forums.rpgmakerweb.com/threads/puzzle-system-i-need-help.142997/