Help with event touches not executing on the first touch.

JTK

Villager
Member
Joined
May 25, 2018
Messages
26
Reaction score
4
First Language
english
Primarily Uses
RMMV
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
 

HumanNinjaToo

The Cheerful Pessimist
Veteran
Joined
Apr 18, 2013
Messages
1,226
Reaction score
603
First Language
English
Primarily Uses
RMMV
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.
 
  • Like
Reactions: JTK

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
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.
 

Bex

Veteran
Veteran
Joined
Aug 2, 2013
Messages
1,492
Reaction score
408
First Language
German
Primarily Uses
RMMV
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.
 
Last edited:

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,863
Messages
1,017,053
Members
137,571
Latest member
grr
Top