Pressure plate works, but text keeps repeating...

pokket

Villager
Member
Joined
Mar 9, 2014
Messages
11
Reaction score
1
First Language
English
Primarily Uses
Hey guys. So I'm fairly new to VX Ace and been working on my first dungeon. For it I wanted to do a pressure plate puzzle. I found a tutorial on here and it works great, but I'm having a problem I can't seem to fix. Whenever the player or the boulder touches the button the text display keeps repeating as well as the sound effect whenever I hit enter to continue. I feel like there's something I'm missing and I'm thinking that since it's a parallel process it's going to do that unless I end it. So I created a new page that has the switch turned on and that works, but then the pressure plate switch stays on instead of going back to its original status whenever the player or boulder goes off it which is of course not what I want.

I've tried other ideas to fix this such as creating another conditional branch in a new event page where the coordinates are not equal to the button's coordinates, but because the player is already on the spot and stuck in the repeating text loop it doesn't work either. I know it's probably something really simple I'm missing, but due to my lack of knowledge with creating events I am completely at a loss here.

pressureplateevent.jpg
 
Last edited by a moderator:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,675
First Language
German
Primarily Uses
RMMV
The event is set to parallel process, and parallel processes always repeat themselves unless turned off.


Basically you should never place text output into a repeating parallel process, because you won't be able to shut that off without shutting off the parallel process.


Please take a step back and describe to us what you want to achieve, then we might be able to do something about that.


And with that I don't mean logic descriptions, I want to know what should happen in the game when the player steps on that tile.


I think you're trying to make one event (boulder) trigger another one (switch), and that is basically the wrong way to go about it, you usually only make the boulder event take care of everything in those types of puzzles...
 

seita

Donn_M
Veteran
Joined
Feb 6, 2013
Messages
2,254
Reaction score
611
First Language
English
Primarily Uses
I looked at the tutorial you mentioned, you forgot to make the 2nd page with the self switch trigger. This makes it so that the event doesn't run a second time once its finished.
 

pokket

Villager
Member
Joined
Mar 9, 2014
Messages
11
Reaction score
1
First Language
English
Primarily Uses
Sorry, I guess I overdid it with my description. Basically, I want the player to be able to push the boulder onto the button and turn on a switch that opens a door in another room. The idea is two different puzzles where you move a boulder onto a button that unlocks a door. I tried doing it through event touch and it doesn't work, and the only way that seems to work is doing a parallel process but I get the repeating sound effect and text display. It's basically a "pressure plate" puzzle where the boulder and the player both trigger the button, but you need to move the boulder onto the button so the button stays pressed.

I looked at the tutorial you mentioned, you forgot to make the 2nd page with the self switch trigger. This makes it so that the event doesn't run a second time once its finished.
The self switch trigger is tied to the door that the puzzle unlocks, and I have already done that.
 
Last edited by a moderator:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,675
First Language
German
Primarily Uses
RMMV
Basically, I want the player to be able to push the boulder onto the button and turn on a switch that opens a door in another room.
And that is what will not work. An Event cannot trigger another event - which means pushing the boulder on that switch event will result in exactly nothing.
The trigger "event touch" is for cases when the event is moving onto the player - it does not work on another event.


That is why I said that you need to move the logic into the boulder if you want it to work that way...
 

pokket

Villager
Member
Joined
Mar 9, 2014
Messages
11
Reaction score
1
First Language
English
Primarily Uses
And that is what will not work. An Event cannot trigger another event - which means pushing the boulder on that switch event will result in exactly nothing.

The trigger "event touch" is for cases when the event is moving onto the player - it does not work on another event.

That is why I said that you need to move the logic into the boulder if you want it to work that way...
I tried tying it to the boulder, but I still can't seem to get it to work and that's probably cause I'm still a novice and don't know what I'm doing. I'll keep messing around with it though. Thanks.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,675
First Language
German
Primarily Uses
RMMV
I tried tying it to the boulder, but I still can't seem to get it to work and that's probably cause I'm still a novice and don't know what I'm doing. I'll keep messing around with it though. Thanks.
The boulder needs to check its own position against the position where the button is, and if the boulder is on the correct position then the switch for the door should be accessed.
That check doesn't need a parallel process, because it only needs to be checked when the boulder is moved - usually by player touch or action button, checking the player position and changing the boulder position into the other direction away from the player.


The button on the ground will either be a tile picture if it doesn't need to be changed, or a two-page empty event, with the button-pressed page conditioned on the same switches as the boulder. Both pages would not have any content in this case.


If you want the button to be pressed by the player in addition to the boulder, then you need three pages.


Basic page 1 (unpressed) reacts to player touch, below player and does nothing than to control a self-switch ON.


Second page is conditioned to that self-switch, set on parallel process and checks if the player is still on the coordinates of that event (a simplified version of your posted code). If not, the self-switch is controlled OFF. This page will have the button pressed graphic


The third page is the same as in the boulder-only variant - no content, sprite as button pressed, conditioned to the switch from the boulder-event.


That is the basic difference:


You don't need to get everything for the button pressed on one event page, you can make several pages with the grafic for button pressed and have them react to different logic/switches - the player will never be able to see the difference.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

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
How many parameters is 'too many'??

Forum statistics

Threads
105,864
Messages
1,017,056
Members
137,573
Latest member
nikisknight
Top