Hey there! I'm relatively new to rpgmaker xp and I'm trying to make a game with a stealth mechanic. I know I need a way to detect if the player is moving so I can put in the footstep noises but I can't find a script that works for XP. And I'm wondering if there's a way to make npcs be able to detect that noise?
How to make the player have footsteps and how to make npcs react to them?
RPG Maker XP Supportyou can make a square range around the NPC that they can hear.
first 2 variables that get the player X and Y
then two other variables that get the X and Y of the event.
then you choose the range they can hear the player, (i.e. 4 squares)
then you diminish 4 from both X and Y event position variables.
you will then make some conditional branches.
if the player x is equal or greater than the event x,
in it if the player y is equal or greater than the event y,
then you sum 9(one plus the range times two) to both event variables.
then it it if the player x is equal or lesser than the event x,
in it if the player y is equal or lesser than the event y.
the player is in hearing range. you can turn on moving after player.
if the x of the player is bigger than the events it is to its
first 2 variables that get the player X and Y
then two other variables that get the X and Y of the event.
then you choose the range they can hear the player, (i.e. 4 squares)
then you diminish 4 from both X and Y event position variables.
you will then make some conditional branches.
if the player x is equal or greater than the event x,
in it if the player y is equal or greater than the event y,
then you sum 9(one plus the range times two) to both event variables.
then it it if the player x is equal or lesser than the event x,
in it if the player y is equal or lesser than the event y.
the player is in hearing range. you can turn on moving after player.
if the x of the player is bigger than the events it is to its
Ooo thank you for this!
Original thread: https://forums.rpgmakerweb.com/threads/how-to-make-the-player-have-footsteps-and-how-to-make-npcs-react-to-them.167271/