Jump to content

making sight-locked NPCs


caramellcube

Recommended Posts

[spoiler warning for Alpine Heights player home, which is partly why I've put this here]

 

I'm about to start adding a new hazard to a mod I'm working on and I could use some advice on how best to do it. The basic plan is to have 1 or more mannquins in a large indoor area, that act as sight-locked NPCs, similar to weeping angels or SCP-173. The player has to escape from the area by manuvering in such a way as to maintain line of sight wherever posible, or get hit by increasingly strong attacks.

 

So far I've come up with the idea of having 1 or 2 mannequins scripted to run a line of sight check every few seconds while the player is in the cell, using a moveto command to move them near the player if out of line of sight, and attacking if they only moved a short distance. Along with this, a number of trigger boxes could move or enable static mannequins on colision if the player doesn't have them in view, again potentially attacking. I doubt that this is the best way to do this, but I can't spend a lot of time experimenting in the GECK at the moment and I want to make it fairly simple and reliable. I thought about making the mannequin into an actor, but I've done very little work with actors so I'm not sure if it would be worth it, how glitchy it would be, or how exactly to go about it.

 

Any ideas? suggestions? it doesn't have to maintain the same number of mannequins or pay much attention to where they could move through, as long as it's scary and challenging for the player. This is sort of an endboss level for a horror themed area, so thanks in advance for anyone that can help.

Link to comment
Share on other sites

http://cs.elderscrolls.com/index.php/GetLOS

 

The function works the same in the Fallout games. Just keep in mind that it's a slow function, and that calling it too often can affect performance.

It would be best to make your mannequins actors so that you can call the function on them and pass the player as the argument; if called on the player you can pass a non-actor object as the target, but the LOS check passes if the camera has view of the target instead of the player.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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