Difference between revisions of "Talk:Door"
Jump to navigation
Jump to search
imported>Heecf |
imported>Cipscis m (Reverted edits by Heecf (talk) to last revision by GetTheJojDone) |
||
Line 1: | Line 1: | ||
==Controlling NPC usage== | |||
''[Moved from [[:Category Talk:Papyrus|Talk:Papyrus]]]'' | |||
Would anyone happen to know how to stop certain actors from opening a certain door? [[User:GetTheJojDone|GetTheJojDone]] 16:10, 15 April 2012 (EDT) | |||
:The ways I can think of: | |||
:# don't given that NPC any packages that could cause it to travel through the door: give it fixed patrols to follow, make it sandbox out of range of the door, etc. This is the most obvious, simplest way, but fails in extreme situations (if you attack them, they might flee through the door still, etc). | |||
:# make the NPC "bound", as a more restrictive version of the above (problem; they are then unable to walk around). | |||
:# make the door "min use" (problem: affects all NPCs). | |||
:# lock the door, and don't give the NPC the key (problem: has no effect once door opens; affects other NPCs). | |||
:# have a separate navmesh either side of the door, with no connection between the two sides of the door (affects all NPCs; unreliable). | |||
:# (maybe?) set ownership of the door to everyone but that person? Not sure door ownership matters if unlocked, though. | |||
:# have a [[Creating Primitives|collision primitive]] around the door and make it so that this NPC is the only thing that collides with it. Not sure if that's even possible. | |||
:# have a collision primitive around the door with an [[OnTriggerEnter - ObjectReference|OnTriggerEnter]] script that detects that NPC approaching, and changes their chosen package to be "walk away from this door". This way, everyone else can use the door freely, but the door is impassible to that one NPC even if you have made them a follower and are leading them through it (however, they may magically teleport to join you the next time you enter a new cell, if they are a follower). | |||
:If it's a teleport door, ensure that the collision primitive encloses the red navmesh triangle for the door, as well as/instead of the door itself. | |||
:Beware that this might result in them walking up to the door and back away again repeatedly, if their default package can only be fulfilled by passing through the door. | |||
:Beware also that if the player leaves and returns after a few days, that NPC may be randomly placed anywhere in that cell, ignoring primitives and navmesh constraints and sometimes even locked doors! One workaround might be to have another collision primitive to detect the player approaching/leaving, then either move the NPC to a known-valid position on the correct side of the door when the player approaches; or binds the NPC in position, while the player is away. | |||
:Hope some of those ideas were useful. --[[User:Catwheezle|Catwheezle]] 23:44, 16 April 2012 (EDT) | |||
::There are also a few supplied scripts that are meant to control door access; eg. DefaultNoEnemiesFollowDoorScript.psc & DefaultNoFollowDoorScript.psc | |||
::Look at those and see if you can configure them to your liking using the properties, or roll your own script using those as an example. -- [[User:Tunaisafish|Tunaisafish]] 05:47, 17 April 2012 (EDT) | |||
How do I set a patrol route, I'm new to modding, and sorry for the wait, I wasn't expecting a reply. [[User:GetTheJojDone|GetTheJojDone]] 09:25, 19 May 2012 (EDT) | |||
I | |||
I | |||
Revision as of 19:10, 13 August 2012
Controlling NPC usage
[Moved from Talk:Papyrus]
Would anyone happen to know how to stop certain actors from opening a certain door? GetTheJojDone 16:10, 15 April 2012 (EDT)
- The ways I can think of:
- don't given that NPC any packages that could cause it to travel through the door: give it fixed patrols to follow, make it sandbox out of range of the door, etc. This is the most obvious, simplest way, but fails in extreme situations (if you attack them, they might flee through the door still, etc).
- make the NPC "bound", as a more restrictive version of the above (problem; they are then unable to walk around).
- make the door "min use" (problem: affects all NPCs).
- lock the door, and don't give the NPC the key (problem: has no effect once door opens; affects other NPCs).
- have a separate navmesh either side of the door, with no connection between the two sides of the door (affects all NPCs; unreliable).
- (maybe?) set ownership of the door to everyone but that person? Not sure door ownership matters if unlocked, though.
- have a collision primitive around the door and make it so that this NPC is the only thing that collides with it. Not sure if that's even possible.
- have a collision primitive around the door with an OnTriggerEnter script that detects that NPC approaching, and changes their chosen package to be "walk away from this door". This way, everyone else can use the door freely, but the door is impassible to that one NPC even if you have made them a follower and are leading them through it (however, they may magically teleport to join you the next time you enter a new cell, if they are a follower).
- If it's a teleport door, ensure that the collision primitive encloses the red navmesh triangle for the door, as well as/instead of the door itself.
- Beware that this might result in them walking up to the door and back away again repeatedly, if their default package can only be fulfilled by passing through the door.
- Beware also that if the player leaves and returns after a few days, that NPC may be randomly placed anywhere in that cell, ignoring primitives and navmesh constraints and sometimes even locked doors! One workaround might be to have another collision primitive to detect the player approaching/leaving, then either move the NPC to a known-valid position on the correct side of the door when the player approaches; or binds the NPC in position, while the player is away.
- Hope some of those ideas were useful. --Catwheezle 23:44, 16 April 2012 (EDT)
- There are also a few supplied scripts that are meant to control door access; eg. DefaultNoEnemiesFollowDoorScript.psc & DefaultNoFollowDoorScript.psc
- Look at those and see if you can configure them to your liking using the properties, or roll your own script using those as an example. -- Tunaisafish 05:47, 17 April 2012 (EDT)
How do I set a patrol route, I'm new to modding, and sorry for the wait, I wasn't expecting a reply. GetTheJojDone 09:25, 19 May 2012 (EDT)