spawning npcs inside solid objects

Post » Tue Feb 24, 2015 5:49 pm

hey gang.

Been trying to solve this for years. How to detect if my mod Sands of time has spawned a npc inside a mountain or other solid object, trapping the npc inside and thus causing a variety of issues. Is there some way to tell after spawning an npc that he is is inside a solid object? Or to check a randomly chosen spawn point to make sure it is not inside a wall, mountain, etc?

Any help appreciated...

User avatar
Campbell
 
Posts: 3262
Joined: Tue Jun 05, 2007 8:54 am

Post » Tue Feb 24, 2015 10:14 pm

I do this kind of thing in my "extra spawns" feature in my combat mod. Do a cell search for objects you know will not be inside of "solid objects". I use other actors most of the time but you can use anything such as tables, chairs, rocks, plants whatever.

"Place at me" function using another existing world object will automatically place your spawn in a navmesh location and NOT inside of a mountain.

User avatar
Trista Jim
 
Posts: 3308
Joined: Sat Aug 25, 2007 10:39 pm

Post » Wed Feb 25, 2015 12:21 am

I have spawning inside dungeons under control. I use three invisible ghosts and a tail of xmarkers that fallows the player (4 markers). spawning in dungeons is pretty perfect.

Its the outdoors that is an issue. It does no good to search for terrain as spawn points as bethesda gets creative and uses them in weird angles, buried in the earth, half buried, etc. And of course spawning at the player exact location is a no no as it looks bad when they appear out of nowhere in front of the player.

Also, checking for things like plants is resource intensive. Checking for rocks is useless, they place them anywhere in the earth, sometimes just a tiny bit showing. But the biggest issue that I need spawns at a distance from the player, 1,000 to 4000 units. Most of the time it works out, but close to mountains and thick walls I have issues.

User avatar
Ezekiel Macallister
 
Posts: 3493
Joined: Fri Jun 22, 2007 12:08 pm

Post » Tue Feb 24, 2015 10:44 pm

edit: wait, 1,000 to 4000 units? wow that is a hard one, you may need to DROP an item on the ground from high above and use that as a marker!
User avatar
Kayla Oatney
 
Posts: 3472
Joined: Sat Jan 20, 2007 9:02 pm


Return to V - Skyrim