Zorkaz Posted February 12 Posted February 12 Is there a dialouge condition to check if the player has a companion?
SKKmods Posted February 13 Posted February 13 Not that I have found. so created a conditional function: Reveal hidden contents Scriptname SKK_XXXConditionalScript extends Quest Conditional Quest Property pFollowers Auto Const Mandatory Faction Property pCurrentCompanionFaction Auto Const Mandatory ReferenceAlias Property Alias_Companion Auto Const Mandatory ;linked to followers quest alias ReferenceAlias Property Alias_DogmeatCompanion Auto Const Mandatory ;linked to followers quest alias Bool bPlayerHasCompanion = False Conditional ;GetVmQuestVariable QuestName bPlayerHasCompanion ;******************************************************************** Event OnQuestInit() Self.RegisterForCustomEvent((pFollowers as FollowersScript), "CompanionChange") UpdatePlayerHasCompanion() EndEvent ;******************************************************************** Event FollowersScript.CompanionChange(FollowersScript akSender, Var[] akArgs) UpdatePlayerHasCompanion() EndEvent ;******************************************************************** Function UpdatePlayerHasCompanion() bPlayerHasCompanion = False Actor thisActor = Alias_Companion.GetActorRef() If(thisActor != None) && (thisActor.IsInFaction(pCurrentCompanionFaction) == true) bPlayerHasCompanion = True EndIf Actor thisDog = Alias_DogmeatCompanion.GetActorRef() ; allow for dogmeat +1 multiple companions If(thisDog != None) && (thisDog.IsInFaction(pCurrentCompanionFaction) == true) bPlayerHasCompanion = True EndIf EndFunction ;********************************************************************
Glitchfinder Posted February 13 Posted February 13 Bethesda used the global variable "PlayerHasActiveCompanion" (00145867) for this. That's what the Lone Wanderer perk relies on, as well as multiple quest and follower-related checks. There is also a second global for Dogmeat, which is "PlayerHasActiveDogmeatCompanion" (00145868), though that one appears to see less use. For a bit of context, this is the perk entry condition for Lone Wanderer: 1
Recommended Posts