Jump to content

Keeping npcs in place


Drazhar753

Recommended Posts

Hey guys!

So I'm trying to have a skeever and a goat remain in a small cage each, but the problem is whenever you enter the cell after they've been loaded, or use the 'wait' function, they teleport out of their cages. I have tried a few AI packages such as 'Stay at current location' and 'sittarget' linked to an xmarker within the cage, but they still teleport out, to which they then walk back towards the cage but can't get in obviously. So I'm not sure how to keep them in there. They 'physically' fit, but I still assume it's due to the cage being rather small. Any ideas?

Thanks :)

Link to comment
Share on other sites

Hey guys!

 

So I'm trying to have a skeever and a goat remain in a small cage each, but the problem is whenever you enter the cell after they've been loaded, or use the 'wait' function, they teleport out of their cages. I have tried a few AI packages such as 'Stay at current location' and 'sittarget' linked to an xmarker within the cage, but they still teleport out, to which they then walk back towards the cage but can't get in obviously. So I'm not sure how to keep them in there. They 'physically' fit, but I still assume it's due to the cage being rather small. Any ideas?

 

Thanks :smile:

If the skeever and goat do not need to leave the cages ever. Try placing them inside then placing a collision marker over the cage so they can't move and mark it as NAV_CUT that cuts the navmesh under the cage.

Link to comment
Share on other sites

 

Hey guys!

 

So I'm trying to have a skeever and a goat remain in a small cage each, but the problem is whenever you enter the cell after they've been loaded, or use the 'wait' function, they teleport out of their cages. I have tried a few AI packages such as 'Stay at current location' and 'sittarget' linked to an xmarker within the cage, but they still teleport out, to which they then walk back towards the cage but can't get in obviously. So I'm not sure how to keep them in there. They 'physically' fit, but I still assume it's due to the cage being rather small. Any ideas?

 

Thanks :smile:

If the skeever and goat do not need to leave the cages ever. Try placing them inside then placing a collision marker over the cage so they can't move and mark it as NAV_CUT that cuts the navmesh under the cage.

 

 

 

Thanks for the reply Aragorn

 

I tried your suggestion, first with a collision cube encasing them and then a collision plane underneath them both with nav_cut set, didn't seem to work. Perhaps because there was no nav_mesh where they were to begin with? Maybe that's why. I'll have to see if that fixes it.

 

Okay, can confirm that placing navmesh under the cages kept the npcs in there. I honestly didn't think it was necessary seeing as all they were doing was staying put, and it's also in a corner of a room so navmesh seemed unnecessary. Ah well, thanks for the help Aragorn, you helped me figure out what the issue was so kudos :)

Edited by Drazhar753
Link to comment
Share on other sites

You really needs navmeshes for any kind of npc (even mannequins) or else they will simply teleport to the nearest navmesh they can find.

Another thing you can do if the npc is moving too much (even with a navmesh under it) is to place an idle marker and then give it an AI package to stay on that idle marker.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...