Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Proximity/Pathfinding in event

Clad

Member

Hi everyone,
          I am having some problems with Events in Rpgmaker XP. I would like to know if there is actually a tutorial for a NPC character to detect the hero's position in the map and walks to him, while automatically choosing the right route and moving aside from other NPCs/objects which could potentially block its path. Can anyone guide me on how to make this using only Events or is there any tutorial for it?

Many thanks for your time.
 
As far as I know you can set the Autonomous Movement Type to Approach, making the event always try to find a way to get closer to the player. This has its problems though, as sometimes it chooses really odd paths or even walks away from the player if you move around, but this is the only solution you can manage without implementing a good pathfinding script.

If you want to do this inside an event, like when something is running, use:
Code:
@>: Set Move Route (Event)
    Move Towards Player
Repeat this for as many steps as you want, or check the Repeat Action box for continuous action.

Hope this helps.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top