youbetterwork Posted July 7, 2017 Share Posted July 7, 2017 Hey all - I'm trying to Dismiss a follower after a boss kills her by accessing the vanilla follower script from my script, but it doesn't work. Look below: Scriptname EricStoneScriptedBoss extends ObjectReference Actor Property ESSB_Boss1 auto Actor Property Wifu1 auto Actor Property Wifu2 auto ObjectReference Property PlaceThatSellsWifus auto Faction Property CurrentFollowerFaction auto Faction Property DismissedFollowerFaction auto DialogueFollowerScript Property ESSB auto Event OnDying(Actor killer) Wifu1.StopCombat() Wifu2.StopCombat() Wifu1.Kill(ESSB_Boss1) Wifu2.Kill(ESSB_Boss1) Utility.Wait(5) Wifu1.Moveto(PlaceThatSellsWifus) Wifu2.Moveto(PlaceThatSellsWifus) Wifu1.Resurrect() Wifu2.Resurrect() ESSB.DismissFollower(Wifu1) ;type mismatch on parameter 1 (did you forget a cast?) ESSB.DismissFollower(Wifu2) ;type mismatch on parameter 1 (did you forget a cast?) Wifu1.ModFactionRank(CurrentFollowerFaction, -2) Wifu2.ModFactionRank(CurrentFollowerFaction, -2) Wifu1.AddtoFaction(DismissedFollowerFaction) Wifu2.AddtoFaction(DismissedFollowerFaction) Wifu1.EvaluatePackage() Wifu2.EvaluatePackage() endEvent Link to comment Share on other sites More sharing options...
youbetterwork Posted July 7, 2017 Author Share Posted July 7, 2017 I fixed it. I should have had a property for the quest - not the script. I feel like Fallout 4 handled this differently... Anyway - Here is the script that works: Scriptname EricStoneScriptedBoss extends ObjectReference Actor Property ESSB_Boss1 auto Actor Property Wifu1 auto Actor Property Wifu2 auto ObjectReference Property PlaceThatSellsWifus auto Faction Property CurrentFollowerFaction auto Faction Property DismissedFollowerFaction auto quest Property pDialogueFollower Auto Event OnDying(Actor killer) Wifu1.StopCombat() Wifu2.StopCombat() Wifu1.Kill(ESSB_Boss1) ;This is the Boss killing the girls when he dies Wifu2.Kill(ESSB_Boss1) Utility.Wait(5) Wifu1.Moveto(PlaceThatSellsWifus) ;This moves the girls to the place Wifu2.Moveto(PlaceThatSellsWifus) Wifu1.Resurrect() ;obviously resurrects them Wifu2.Resurrect() If !(Wifu1.IsInFaction(DismissedFollowerFaction)) (pDialogueFollower as DialogueFollowerScript).DismissFollower(0, 0) Wifu1.ModFactionRank(CurrentFollowerFaction, -2) Wifu1.AddtoFaction(DismissedFollowerFaction) EndIf If !(Wifu2.IsInFaction(DismissedFollowerFaction)) (pDialogueFollower as DialogueFollowerScript).DismissFollower(0, 0) Wifu2.ModFactionRank(CurrentFollowerFaction, -2) Wifu2.AddtoFaction(DismissedFollowerFaction) EndIf ;This sets the girls to not follow you anymore, follower overhaul mods might override this. IDK Wifu1.EvaluatePackage() ;because moving and resurrecting can mess with the AI, this "wipes the memory" Wifu2.EvaluatePackage() endEvent Link to comment Share on other sites More sharing options...
Recommended Posts