Forum Discussion

LadyMo218's avatar
LadyMo218
Member
2 months ago

Roaming NPC

Is anyone willing to spare about 30 minutes (maybe less) to help me set up an NPC that roams aimlessly among a given area?

Things I've tried with no success:

I'm fairly new to typescript and this is driving me crazy. But i feel like if someone shows me once, I can do it myself from there anytime I want to create a roaming NPC again.

Please and thank you in advance. You would be saving my sanity

2 Replies

  • What has your process been in trying to set this up so far? This will help determine what's got you stuck :)

    Have you:

    • Set up a navmesh and can see the coloured grid overlay
    • Added the NPCs API from the scripts settings panel
    • Got the worlds NavMeshManager in your script
    • Got the NPC as an NpcPlayer in your script

    Or is the issue more that you've got them to move but structuring code to "roam" is tricky?

    I think the NPC API has changed recently, I've found the GenAI code to be out of date as far as NPCs are concerned.

    • LadyMo218's avatar
      LadyMo218
      Member

      All of the above. I went back to the public asset NPC roaming and was able to tweak it with the help of ChatGPT (Typescript). GenAI is very outdated and often messes things up.