Pushing boulders while holding a grab button?

Yes, there's like 12 topics on the push and pull puzzles but my question is more about UX than the mechanics. This works well:
1590488410390.png

but it's based on the dialogue choices and that's really meh. I tried something like this:
1590488455142.png

And it ALMOST works. Except it won't let me hold OK and then press Right or Left. It requires me to rapidly press OK and then a direction. Is there a way to make it so that you just hold the action button and then choose direction?
Yes, you are close.
Now, put those event inside LOOP which break when you release the OK button.
1590489976236.png


You're welcome.
Yes, that's a good step forward, thanks! Still, not enough 🙂

1) You also need to break loop after every direction. Otherwise if you press too long, it pushes it by 2 or more tiles.
2) You also need to change the player speed, otherwise the boulder won't catch up with the player
1590491516106.png

However, this still has one problem: it doesn't work for pulling as it always checks the event first then player character. And if the player is blocking the way, the whole direction won't happen.
Solution:
1590492581591.png
if you want to puch a rock smoothly, you can also use this script:

$gameMap.event(this._eventId).canPass($gameMap.event(this._eventId).x, $gameMap.event(this._eventId).y, 2);

(2 (up) is the direction), 4 left, 8 up, 6 right)
... isn't that the whole point of "grabbing"? You can move them as long as you hold the button. Not one tile at a time then I have to "grab" it again. But whatever you like then...

Uggh, also why people like to make things complicated? =_=
Just remove the "skip if cannot move" check!
That will make the event wait until it can move.
In this case, the player block the path.
So it will move after anything prevent it move away.
And to prevent the event to move outside where it supposed to, add an empty movement route for the event to OVERWRITE its last movement. Make sure to put "wait" for the player movement.

1590499100303.png


THERE! Tested!

This remind me of that MV tutorial video of pushing rock with lotsa variable and direction check which can be done with just a single "move away from player" movement route.
Problem with your approach starts when you introduce 4 directions and you grab it from one side and can drag it all 4 directions.
....? Now what are you talking about?
........
Reading the thread title once again, you mean it was supposed to be ONLY "push" and "pull" ...? =_=
Should've said that earlier...
Well, my fault for following your initial attempt on your screenshot which doesn't contain your FULL event, causing me to misunderstand your point. I bet yours is very long, that's why you cut it.

1590507165938.png

There you go...
it require 2 variable : One to check player direction and the other one check button direction.
Now you can ONLY "Push away" or "Pull toward".
Simple.

I demand a like reaction now!
You're an interesting fellow. I solved it by myself already. My fix works and feels better. I highly prefer it. I don't get why you're getting frustrated. That I didn't tell you that a boulder can be pushed or pulled from 4 sides not 2? Well, it can. It's a 2D engine not a 1D engine.

I'm grateful for your help - your first post did put me on the right track. You don't have to shove your final solution down my throat though. Have a beer. Relax.

Cheers.
Okay...
My problem is just people often misunderstood me and I often misunderstood people. That's why I spend my time doing deeds here. To understand people. I also type slow and edited my wording bunch of times to avoid those.

So, I still don't understand... in the end, you don't need it to be only push and pull or what? Cause I also think moving the boulder to the side of your facing direction is weird.
Yes, it is weird. I don't want that. But I solved it already and it works pefectly for me. Thanks for helping out!

Original thread: https://forums.rpgmakerweb.com/threads/pushing-boulders-while-holding-a-grab-button.122068/