This is my common event for footsteps. It works perfectly except for one issue, when i hold down shift ($gamePlayer.isDashing() ) even if im not moving it will make the Footstep SE. How do i prevent this? even when i add $gamePlayer.isMoving() it doesnt really help either. Im just trying to make it so that when i hold shift no audio comes out until i ACTUALLY start moving.
Need some quick guidance on eventing.
Javascript/Plugin SupportUghhh, first please don't use else when you are checking same variable... it's not like the variable will change in the middle of event and it hurts both my eyes and feeling.
Do it like this.
I already tested. It will only make sounds when you are holding shift while moving.
Do it like this.
I already tested. It will only make sounds when you are holding shift while moving.
roger captain. And sorry for all the "else" i copy and pasted the check variables so they all ended up with else xD. Thanks for the help good sir.
Worked like a charm. Thanks Kuro-san. Mod can close the post since its solved <3
Actually, in many cases, the variable can, and does change within the loop, so not having the conditions nested can cause issues. Doing separate checks the way you have is also inefficient. If you have 4 conditions and the first one is true, it's still going to check the other 3. Having them nested, if the first one is true, it's going to skip the remaining ones. So it's actually better to have the Else.
OP, to have a thread closed, you need to report your first post and let the mods know it's solved.
Oh sorry about that. Not really good with forums. Thank you.
don't worry about it - we all start somewhere 🙂
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.
Original thread: https://forums.rpgmakerweb.com/threads/need-some-quick-guidance-on-eventing.119025/