Larian Studios
Posted By: Xephael Tutorial - Basic NPC Patrols - 22/09/17 06:10 PM
For those who want to learn how you can make NPCs patrol around, here's a basic tutorial using splines: https://docs.larian.game/NPC_Patrols
Let me know if you have any suggestions to improve it.
Posted By: SniperHF Re: Tutorial - Basic NPC Patrols - 22/09/17 06:15 PM
What's the benefit of using a spline patrol vs a normal trigger patrol?
Posted By: Xephael Re: Tutorial - Basic NPC Patrols - 22/09/17 06:21 PM
Originally Posted by SniperHF
What's the benefit of using a spline patrol vs a normal trigger patrol?

Well, a spline patrol is a bit more simple and easy to set up, but I was planning to add information on the differences between each patrol type to that page as well. Just figured I'd put up the basic guide for anyone who needs it.
Posted By: Windemere Re: Tutorial - Basic NPC Patrols - 22/09/17 06:23 PM
Great to see more people contributing to the wiki, thanks for putting this up. wave
Posted By: TheLambert Re: Tutorial - Basic NPC Patrols - 23/09/17 03:01 PM
Hello, are the splines invisible? I can still see them with the "game camera" activated but I can't be sure.
Posted By: Xephael Re: Tutorial - Basic NPC Patrols - 23/09/17 03:03 PM
Originally Posted by TheLambert
Hello, are the splines invisible? I can still see them with the "game camera" activated but I can't be sure.

That's the case with everything in the engine window. In the game, things like triggers and splines aren't visible.
Posted By: TheLambert Re: Tutorial - Basic NPC Patrols - 23/09/17 03:24 PM
Ah, I just assumed the game camera would act like the game haha
Posted By: SniperHF Re: Tutorial - Basic NPC Patrols - 23/09/17 10:16 PM
You can hide all that stuff in the editor as well if it bugs you when testing.

View > Gizmos (or control +L) You might have to do it twice.
Posted By: Fraktal Re: Tutorial - Basic NPC Patrols - 01/10/17 09:17 PM
I don't understand, I followed the tutorial and I added the Spline but the NPC is not following them. He just stay still...
Do you know if I can find another tutorial or a video ?
Posted By: Xephael Re: Tutorial - Basic NPC Patrols - 02/10/17 09:46 PM
Originally Posted by Fraktal
I don't understand, I followed the tutorial and I added the Spline but the NPC is not following them. He just stay still...
Do you know if I can find another tutorial or a video ?

That's odd, I don't know of any other tutorials for patrols, but just to make sure, you added the spline patrol script to the NPC and changed the GUID to the GUID for the spline patrol right?
Posted By: Fraktal Re: Tutorial - Basic NPC Patrols - 03/10/17 09:20 PM
I recorded what I did.
Could you tell me what is wrong ?
Thanks !
https://youtu.be/qd3BEr_UcJc
Posted By: Xephael Re: Tutorial - Basic NPC Patrols - 04/10/17 02:55 AM
Originally Posted by Fraktal
I recorded what I did.
Could you tell me what is wrong ?
Thanks !
https://youtu.be/qd3BEr_UcJc

Ah yes, what you're doing is adding three splines to the level. Instead, you'll need to add a single spline and use the spline point tool on the left to add waypoints to that spline. (After you click the tool, click the spline and then start clicking to add points). Let me know if that works.
Posted By: Fraktal Re: Tutorial - Basic NPC Patrols - 05/10/17 08:50 PM
thank you ! You make my day smile
Posted By: Xephael Re: Tutorial - Basic NPC Patrols - 05/10/17 10:04 PM
Originally Posted by Fraktal
thank you ! You make my day smile

Glad that worked for you smile
Posted By: Xephael Re: Tutorial - Basic NPC Patrols - 13/01/18 03:36 AM
Bumping this thread so that people with the default forum setting of 3 months can view it.
Posted By: Detect Re: Tutorial - Basic NPC Patrols - 30/01/18 05:59 PM
found a bug with spines I think. When I spawn a monster from a trigger.. they do not follow the path. In fact they spawn at the edge of the map, the corner were the PC spawns...spent sometime trying to debug then gave up...
Posted By: LarIlya Re: Tutorial - Basic NPC Patrols - 31/01/18 08:38 AM
What did you do to make the monster follow the path?
Posted By: Xephael Re: Tutorial - Basic NPC Patrols - 31/01/18 04:45 PM
Originally Posted by Detect
found a bug with spines I think. When I spawn a monster from a trigger.. they do not follow the path. In fact they spawn at the edge of the map, the corner were the PC spawns...spent sometime trying to debug then gave up...

Unfortunately, I currently can't look into this because I'm not on a computer that can open the editor, and I've never spawned characters from a trigger. It sounds like the first thing to work out would be how to spawn the monster where you want them to spawn because that sounds like a separate issue. You could try asking about that in the general modding section. Other than that make sure the monster being spawned has the GEN_SplinePatrol script and that it's configured correctly with the Spline's GUID.

Originally Posted by LarIlya
What did you do to make the monster follow the path?

You need to add the GEN_SplinePatrol script to the monster with the GUID of the spline. The last three images in the tutorial explain how to do that.
Posted By: LarIlya Re: Tutorial - Basic NPC Patrols - 31/01/18 09:11 PM
Originally Posted by Xephael
Originally Posted by LarIlya
What did you do to make the monster follow the path?

You need to add the GEN_SplinePatrol script to the monster with the GUID of the spline. The last three images in the tutorial explain how to do that.


Sorry if my question was unclear. What I meant to ask was, how Detect was setting up a dynamically spawned creature's script.
But thank you anyway.
© Larian Studios forums