Asking for help : changing player speed cancels "On Touch" event

Hello,

I created a small parallel process in the common events of RPGMaker 2000 to change the hero’s movement speed depending on the terrain he’s standing on. It works, but I have encountered a problem:

If the parallel process detects a terrain change and applies the new speed at the exact same moment the hero steps onto a map event with an “On Touch” trigger, the speed change occurs but the touch event is ignored entirely.

I understand it is the default RPG_RT behavior so technically it is not a bug, but ideally I would like the speed change to run first, and then have the touched event applied immediately afterward.

I made a very small RM2003 project and a video to demonstrate the issue, in case my explanation wasn’t entirely clear.

Here’s what I’ve tried so far to restore the map event execution:

  • Splitting detection and application into separate events with switches.
  • Delaying the speed application by 0.3 seconds after detection (kinda works… but causes a visible delay).
  • Applying the speed change from a map-based parallel process instead of a common event one.
    Unfortunately, none of these fully solve the problem.

I then attempted a different approach: forcing the execution of the ignored map touch event by always calling the potential event underneath the hero from the speed-change common event : This works, but I have no reliable way of knowing which event’s page should be called, it depends on the player’s progression in the game.

I tried setting the page number to 0 in EasyRPG, which produces the message “CallEvent: Can’t call non-existent page 0 of event x”.
It means you’ve achieved a way to know if the page exists.

So I was wondering, do you think it would be possible to implement a script in EasyRPG where if I try to call a page that will never exist (-1 for instance), EasyRPG would recognise it and instead of displaying the error would automatically call the “natural” page RPG_RT would execute if the hero were standing on that event without my speed alteration event?

Of course, any suggestions, ideas or workarounds would be greatly appreciated. I’ve been stuck on this issue for days, and I’m starting to feel quite desperate about finding a solution..

Thanks in advance!

Just came by reading this post and I just so happen to have a similar situation ready. In this case a common event parallel process constantly storing the hero party’s terrain ID into a variable, and a map parallel process checking that variable and changing movement speed if it changes.

I went to place an event on that terrain to see how it interacts, and sure enough, just like you describe, an ordinary event set to activate on hero touch does not trigger while the speed change happens. This is in EasyRPG Player 0.8.1.0.

However, I immediately noticed that I have two options to test this behavior: with the event set to trigger by player touch (2. option in the dropdown menu), or by event touch (3. option). And surprisingly, the latter does work and triggers just as expected. The downside is, it keeps triggering as long as you stand on it, and you can’t move, resulting in a softlock if the trigger conditions aren’t removed in some way (switches, teleporting/deleting the event, etc.). If you have a way to incorporate that into your event it might be an option.

Edit:

Just thought of this, another thing that could work is if you set the event you want to trigger as a parallel process that keeps checking if the hero stands on it. It’s a bit clunky, and you’d have to include that for every single event page, but it would still adhere to the event’s running conditions.

So I just tested this and the result is more or less working. There seems to be some small delay in the event commands’ activation, that at higher moving speeds, allows for an additional step (off of the event) before execution. On the flipside, there’s no softlock since you can still walk off the tile when the event is finished.

Well, if you have the courage to edit every event that could potentially be skipped in your maps, may I suggest a more efficient solution to this issue?

  1. Set your map event to “Player Touch”, which avoids softlocks or the need for manual management using “Event Touch” would.
  2. According you’ve already acquired the hero’s position to determine the terrain ID he stands on, use the “Get Event ID…” option (located on page 2) to store in a variable the ID of the map event the hero is currently on.
  3. Adjust the hero’s movement speed in your common event.
  4. In the same event where you change the hero’s speed, check if the stored event ID is greater than 0. If so, call the first page of that event.
  5. In the first page of the event, manage the action that should be triggered if the hero were to step on it under normal conditions by manually calling the desired page of “this event“ based on the player’s progression/active switches.

By doing so, you would prevent any skipping of map events while still triggering them exactly when the hero steps on them, keeping him on this precise spot only for the duration of your event.

As usual, here’s a video and the RM2k3 project using this solution for better understanding.

However, redoing every event is a huge amount of work, especialy if like me you have a large number of existing events to edit. From a maintenance perspective, you would also need to remember to update the first page every time you create a new page, for every event. While it works, I do not think this is the ideal long-term solution.

This is why I would like to know if it’s possible to implement a better solution at the code level in EasyRPG, or if there is any better alternative approach I may not have considered that could address this issue of course.

Ok, I was hesitant to download the files at first but now that I tried the project in RPG Maker the issue becomes more clear. You’re right that my second solution would involve a lot of parallel processes running, and checking per step from the speed changing event is way more efficient in that manner.

However. I didn’t want to give up on the “event touch” idea just yet, and with some slight addition of a switch to deactivate the event it does seem to work just fine. This makes use of a parallel process activated by said switch, that waits for a key press (the key press command, not the one from the “wait” command), adds a 0.0sec delay, then deactivates the switch. So with that, the event stepped on gets deactivated just until you step off of it, without any softlock.

Here’s a (hopefully working) link to my altered version of your demo project:

https://cdn.discordapp.com/attachments/733583254904373268/1405109953961918534/rm2k3_speed_issue_potential_solution.zip?ex=689da21e&is=689c509e&hm=4c292bf3407bb1759062505adc91d9b27fde8efd0f436ffa8764f9d6cdbe5e44&

Not entirely sure if the forum is meant for this kind of discussion, and I can’t seem to figure out how to send PM’s here, but if you’re up to it I’d love to further discuss this and similar things in private conversation.