(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
370
Reaction score
1,276
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 Threads

Latest Posts

Latest Profile Posts

Ahh, end of the day stinky feet, fresh out of the boots. Smells like a job well done. Seriously, I have to rinse my feet when I get home, or it's not fair to my wife.
Stream will be live shortly with some pixel art! Feel free to drop by!

Can't believe I forgot to put an image of my drawing pad! It looks kinda like this, maybe I'll get a better pic tomorrow...
Backup tip: If you don't want to back up your whole project every day, at least back up everything *except* your Image and Audio folders, which you can do weekly/as needed/etc.
The final version of our game is already available both in English and Spanish! ^___^
Can't believe this day has finally come... T_T

Forum statistics

Threads
97,829
Messages
947,197
Members
129,039
Latest member
elskampo
Top