Help with event touches not executing on the first touch.

So I have a small puzzle thats in my game where players have to roll multiple balls across a path and get them into the correct hole. When the player touches it, it takes a move away from the player.

If the player hits it off the edge of the pathway all the non pathway tiles there is an event touch event that reset every ball event to its original place.


However if a ball is knocked off the pathway it doesnt immediately reset the balls when it touches and it has to be knocked another tile off the path before it fully resets all the balls.

How would I go about making it that as soon as it falls off the pathway it resets all the balls?




1592866371558.png



1592866380371.png


1592866391473.png
Event touch operates as either the player touches the event, or the event touches the player, not if an event touches another event. So likely it's not activating until the second push because it then sees the player pushing the ball as the 'touch event' trigger; because the event square is is set to 'same as player', even though transparent is checked, the player hitting the activate button is still triggering the event touch.

edit: As for how to solve the problem, I'm not very good with events. The only thing I could suggest is using conditional branches to check the X,Y location of the ball event, then reset if it is equal to any of the incorrect locations. To do that, maybe a parallel process. I'm not sure the most efficient way to do this sorry.
Events don't trigger other events.

I would get rid of all of those extra events, and use a region to paint all the tiles that would cause a reset.

Then in your ball events, do the move away from player, wait for move completion, then add a conditional branch to see if the ball has moved onto a tile painted with this region tag. You can do that by adding a script that says: this.character(0).regionId() === 5
where 5 is the region id you used to paint that area. Then reset the location of all the balls as necessary.


This will reduce the number of events you have, remove the need for a parallel process event, and you can just copy/paste the ball events and the test will work correctly on each one.
One possible Workaround Solution to build upon what shaz said:
1. Paint a Region Number ontop of the Pathway for example Region1.

Actually i would do inside the Rock Event when it is pushed:
- Sound Effect for Rock Moving
- Moveroute for Rock(THIS EVENT): Turn Away from Player + 1 Step forward (Skip + No Wait for Completion)
- Wait 2 Frames
- Moveroute for Player: 1 Step forward (Skip + Wait for Completion)
- Control Variable1 = Map X of "THIS EVENT" do not use Event Ids, else we cant just copy paste the Rock to make more.
- Control Variable2 = Map Y of "This Event"
- Eventcommand Get Location Info,Safe in Variable3 the Region Id on X = Var1 and Y = Var2
- Conditional branch if Variable3 equals 1
if yes, nothing happens the rock is on the pathway.
else: reset Puzzle because the last pushed rock left the pathway.
Edit:
The Condition if Rock reached target Location can also be placed inside here.
Let us know if you need more help.

Original thread: https://forums.rpgmakerweb.com/threads/help-with-event-touches-not-executing-on-the-first-touch.123185/