HerrBaron Posted January 21, 2015 Share Posted January 21, 2015 Hey folks, I'm doing some updates on the Skyrim Adventurer's Tent, and part of this is updating the scripts I use to move followers into and out of the tent (can't use doors, they don't move, so I use scripted primitive activators). All followers I've tested are working except for Serana. I know she's 'different', and have been through the DLC1_NPCMentalModelScript.psc, functions EngageFollowBehavior() and DisengageFollowBehavior() looking for clues as to how I might be able to detect and move her without specifically scripting an exception for her among all other followers. I want to keep the scripting generic and don't want to have to add the Dawnguard.esm as a master. I've drawn a blank. Here are some snippets of the code I'm using: while( i < nMaxFollowers ) ReferenceAlias raFollower = DialogFollower.GetAlias(i) as ReferenceAlias if ( raFollower != None ) Actor actFollower = raFollower.GetActorReference() if ( IsAllowedToMove( actFollower ) ) MoveNPC( actFollower, Direction ) EndIf Utility.Wait(0.25) EndIf i += 1 endWhile The above is the loop I use to cycle through the DialogFollower quest, checking for followers to move. Bool Function IsAllowedToMove( Actor actNPC ) Bool bRtn = False If ( actNPC != None ) if ( actNPC.IsPlayerTeammate() || \ actNPC.IsCommandedActor() || \ actNPC.GetFactionRank( PlayerFollowerFaction ) >= 0 || \ actNPC.GetFactionRank(CurrentFollowerFaction) >= 0 || \ actNPC.GetCurrentPackage().GetTemplate() == Follow || \ actNPC.GetCurrentPackage().GetTemplate() == FollowerPackageTemplate ) if ( actNPC.GetActorValue("WaitingForPlayer") != 1 ) bRtn = True EndIf EndIf EndIf Return bRtn EndFunction And this is what checks to see if a NPC is eligible to move. As I read the DLC1_NPCMentalModelScript.psc function EngageFollowBehavior(), it looks to me as though the IsPlayerTeammate() check should enable the script to detect her as a follower and move her into or out of the tent. No workie. There have been a few times where Serana shows up inside the tent, but it appears to be at her own discretion. it's a hit and miss proposition. Any ideas on how I might accomplish what I'm trying to do with this? Thanks in advance!-HB Link to comment Share on other sites More sharing options...
HerrBaron Posted January 22, 2015 Author Share Posted January 22, 2015 Please excuse the bump... Link to comment Share on other sites More sharing options...
Recommended Posts