How to make NPCs gather around the player

● ARCHIVED · READ-ONLY
Started by anony 4 posts View original ↗
  1. Sorry for yet another thread, I'm working on a few different things at the moment to prepare for a new project I want to start, I just need to figure out all these little systems first. I'm trying to make a skill called "come here," which the player can choose from the main menu, and it'll call all the npcs in the area to gather around the player. I thought it would be an easy little thing to do with a common event but uh, it's giving me a lot of issues.

    I've decided that there's going to be multiple maps with different npcs depending on the time of day, so my common event is going to contain conditional branches to handle that, and it'll tell the npc events to move towards the player. My first attempt gave every npc a set move route: move toward player. Except this only makes them move towards my player just a little bit before stopping and going back to their random autonomous movement. I want them to actually cross the map to wherever I'm standing and stand near me. If I check the repeat action box, they'll come all the way to me, but then they end up following me and I can't get them to stop. They also managed to surround me in a circle so I couldn't move, and one of them kept glitching because she couldn't decide whether she should stand facing forwards or sideways.

    Does anyone have any ideas on how I can get these npcs to come gather around me without going back to their random movements or stopping halfway through walking to me? Thank you so much in advance!
  2. What you want is rather problematic depending on what you had setup - as you've already seen it can mess up with the existing move routs...


    I suggest you do the following and test how good it will work - the following method has other problems, but it might help.


    1) set up every event that should react to the skill with multiple pages.


    2) the additional page has to be conditioned to a general switch "gather skill active" and the autonomous movement set to "approach player".


    3) have the skill activate the switch (and possible a timer to deactivate the switch later)


    Depending on map structure and what you really want to have in your game, you might need to add a pathfinding script to prevent them from getting stuck, or add another event page to guide the events back to their original area after gathering.
  3. Ahhhh, thank you so much, I think this way could work out! I can't seem to figure out a way to get them to return back to their original spots, but I can at least get them to walk away from the player after the timer runs out. My biggest bug is getting the NPCs to just face in one way -- there's still a few that glitch back and forth because they can't figure out which direction to face me in. Do you know if there's any way to get them to just stay facing one way towards me?
  4. to have them return to their original position you need either a script (one with pathfinding and with an event move to coordinates command), or you need a set event location (which will look like a teleport) or you need to leave the map and return (resets event positions but not switches by default)


    To change the approach behaviour you'll need a script in your case, and that could be more difficult when you mess with autonomous movement...