Forum rules - please read before posting.

NPC

Hi,
i made my NPC able to walk away when my Player comes close to my NPC. How can i make my NPC go to the original position again?
Thanks for help.

Comments

  • Was the "walking away" done through an actionlist? Well the simplest way I can think of is that, when the NPC moves away, you could do an Engine: Wait for a few seconds, once that's done, you could do a Character: Move to Point, to make the character walk back to it's marker. You could also trigger the Character:Move to Point using an AC trigger, like when the player steps in certain area or gets to an area far way enough.
  • I made it through the checkbox in the NPC component of AC.
  • I made it through the checkbox in the NPC component of AC.

    What do you mean, exactly?  Are you saying you found a workaround?

    A Trigger that runs when the Player leaves its boundary would indeed be the best approach.  You could even have the NPC move to it's original position dynamically by first teleporting a dedicated Marker to the NPC's position before having the NPC move away - so that you can then have them move to the Marker's position instead of a pre-set destination.
  • Hi,
    i meant i had done the walking away via the NPC component. Isn't there a possibility to make my player avoid all NPCs in the scene. My player avoids all obstacles in the scene perfectly but always collides with NPCs even if i make my NPCs static. Isn' there a script to handle this?
    Thanks a lot.
  • In 2D, yes - the Navigation Mesh component has options for evading NPCs.

    the same technique is not possible in 3D.  You can, however, make use of Unity's NavMeshAgent / Obstacle components - which you're already doing.
  • Hi,
    i use the Navmesh Obstacle component from unity and it works.
    Thanks again.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.