Zorkaz Posted February 12 Share Posted February 12 Is there a dialouge condition to check if the player has a companion? Link to comment Share on other sites More sharing options...
SKKmods Posted February 13 Share Posted February 13 Not that I have found. so created a conditional function: 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 ;******************************************************************** Link to comment Share on other sites More sharing options...
Glitchfinder Posted February 13 Share 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 Link to comment Share on other sites More sharing options...
Zorkaz Posted February 13 Author Share Posted February 13 Thank you. Link to comment Share on other sites More sharing options...
LarannKiar Posted February 15 Share Posted February 15 You can try GetPlayerTeammateCount() > 0 as well. 1 Link to comment Share on other sites More sharing options...
Recommended Posts