(Solved) Check if player is moving?

LostFonDrive

Veteran
Veteran
Joined
Feb 13, 2015
Messages
161
Reaction score
43
First Language
English
Primarily Uses
Hi guys,
I am trying to implement a stealth section into my game. One mechanic I wanted to add was allowing the player to hide inside a crate or barrel, and the idea is if enemies don't see them moving while in the crate, they will not detect them. But if the player is moving when the enemy looks in their direction, they will be detected.

Of course, there is no standard way to create a conditional branch that checks if the player is mid-movement. Is there a way to do this?
 

Kuro DCupu

Trust me, I'm a veteran RMer
Veteran
Joined
Jul 6, 2014
Messages
376
Reaction score
1,285
First Language
Bahasa
Primarily Uses
RMMV
It's :
$gamePlayer.isMoving()

1586518049483.png

It checks if the player is in the middle of "moving" or not. So if the player presses movement button, but the character is stuck, it will be considered NOT moving.
 

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

Latest Posts

Latest Profile Posts

Anyone have advice for recruiting friends to bugtest with you? I had some buddies volunteer without me asking, and we agreed on dates and times... and they all just flaked...
A mousefolk sprite I made, I think I did good.
Discovering math. functions for damage formulas was one of the greatest things for me.
It's very useful for balancing skills to work in a variety of possible circumstances.
For example if you have a skill that is supposed to work for both mages and warriors:
Code:
Math.max(a.atk * 2 - b.def, a.mat * 2 - b.mdf)
SpaceX: First-ever successful (manned) commercial spaceflight!! In these terrible and self-sabotaging times for the world, that's a ray of excitement and hope I needed badly.

Forum statistics

Threads
98,019
Messages
948,579
Members
129,276
Latest member
abhikhurana
Top