Pushing boulders while holding a grab button?

Woland

Veteran
Veteran
Joined
Mar 26, 2017
Messages
350
Reaction score
98
First Language
Polish
Primarily Uses
RMMV
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?
 

Kuro DCupu

Trust me, I'm a veteran RMer
Veteran
Joined
Jul 6, 2014
Messages
480
Reaction score
1,468
First Language
Indonesia
Primarily Uses
RMMV
Yes, you are close.
Now, put those event inside LOOP which break when you release the OK button.
1590489976236.png

You're welcome.
 

Woland

Veteran
Veteran
Joined
Mar 26, 2017
Messages
350
Reaction score
98
First Language
Polish
Primarily Uses
RMMV
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.
 

Woland

Veteran
Veteran
Joined
Mar 26, 2017
Messages
350
Reaction score
98
First Language
Polish
Primarily Uses
RMMV

ShadowDragon

Veteran
Veteran
Joined
Oct 8, 2018
Messages
2,948
Reaction score
1,053
First Language
Dutch
Primarily Uses
RMMV
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)
 

Kuro DCupu

Trust me, I'm a veteran RMer
Veteran
Joined
Jul 6, 2014
Messages
480
Reaction score
1,468
First Language
Indonesia
Primarily Uses
RMMV
... 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.
 
Last edited:

Woland

Veteran
Veteran
Joined
Mar 26, 2017
Messages
350
Reaction score
98
First Language
Polish
Primarily Uses
RMMV
Problem with your approach starts when you introduce 4 directions and you grab it from one side and can drag it all 4 directions.
 

Kuro DCupu

Trust me, I'm a veteran RMer
Veteran
Joined
Jul 6, 2014
Messages
480
Reaction score
1,468
First Language
Indonesia
Primarily Uses
RMMV
....? 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!
 
Last edited:

Woland

Veteran
Veteran
Joined
Mar 26, 2017
Messages
350
Reaction score
98
First Language
Polish
Primarily Uses
RMMV
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.
 

Kuro DCupu

Trust me, I'm a veteran RMer
Veteran
Joined
Jul 6, 2014
Messages
480
Reaction score
1,468
First Language
Indonesia
Primarily Uses
RMMV
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.
 

Woland

Veteran
Veteran
Joined
Mar 26, 2017
Messages
350
Reaction score
98
First Language
Polish
Primarily Uses
RMMV
Yes, it is weird. I don't want that. But I solved it already and it works pefectly for me. Thanks for helping out!
 

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

Latest Threads

Latest Profile Posts

Don't forget, aspiring writers: Personality isn't what your characters do, it is WHY they do it.
Hello! I would like to know if there are any pluggings or any way to customize how battles look?
I was thinking that when you start the battle for it to appear the eyes of your characters and opponents sorta like Ace Attorney.
Sadly I don't know how that would be possible so I would be needing help! If you can help me in any way I would really apreciate it!
The biggest debate we need to complete on which is better, Waffles or Pancakes?
rux
How is it going? :D
Day 9 of giveaways! 8 prizes today :D

Forum statistics

Threads
106,049
Messages
1,018,547
Members
137,835
Latest member
yetisteven
Top