Katabug Posted May 4, 2024 Share Posted May 4, 2024 I followed Seddon's tutorial on YouTube to make my very first companion. He's just about perfect, except for one small problem, I don't want him to use Ammo, yet for the life of me I can't figure out how to add it in my script. After days of searching, I finally figured out how to make my companion draw his weapon. But I can't find any examples of how to use TeammateDontUseAmmoKeyword. I tried adding: Keyword Property TeammateDontUseAmmoKeyword Auto Const But that didn't work. Anyway, this is my current script. Scriptname NormanCompanion:NormanCompanionScript extends Quest Conditional Int Property Status Auto Conditional {0=Home, 1=Following, 2=Waiting} ReferenceAlias Property Alias_NormCompanion Auto Const Faction Property CurrentCompanionFaction auto Const Keyword Property TeammateReadyWeapon_DO Auto Const Function HireCompanion() Actor Companion = Alias_NormCompanion.GetActorRef() Status = 1 Companion.SetPlayerTeammate(True) Companion.AddToFaction(CurrentCompanionFaction) Companion.AddKeyword(TeammateReadyWeapon_DO) Companion.EvaluatePackage() EndFunction Function FireCompanion() Actor Companion = Alias_NormCompanion.GetActorRef() Status = 0 Companion.SetPlayerTeammate(False) Companion.RemoveFromFaction(CurrentCompanionFaction) Companion.RemoveKeyword(TeammateReadyWeapon_DO) Companion.EvaluatePackage() EndFunction If anybody knows how to do this and can give me an example of what the code should look like, I'd be really grateful. Link to comment Share on other sites More sharing options...
SKKmods Posted May 4, 2024 Share Posted May 4, 2024 Here is a standlone global script fragment example that is callable from the console. Convert GetFormFromFile into properties for a form attached script: Script SKK_GlobalScript Function SwitchCurrentCompanionDontUseAmmo() Global ; CallGlobalFunction "SKK_GlobalScript.SwitchCurrentCompanionDontUseAmmo" Quest Followers = Game.GetFormFromFile(0x00289e4, "Fallout4.esm") as Quest ReferenceAlias Companion = (Followers as FollowersScript).Companion ObjectReference CurrentCompanion = Companion.GetReference() If(CurrentCompanion != None) Keyword TeammateDontUseAmmoKeyword = Game.GetFormFromFile(0x0023f1ca, "Fallout4.esm") as Keyword If(CurrentCompanion.HasKeyword(TeammateDontUseAmmoKeyword) == false) CurrentCompanion.AddKeyword(TeammateDontUseAmmoKeyword) Else CurrentCompanion.RemoveKeyword(TeammateDontUseAmmoKeyword) EndIf Debug.Trace("SKK_GlobalScript.CurrentCompanionDontUseAmmo updated " + CurrentCompanion) Endif EndFunction 1 Link to comment Share on other sites More sharing options...
Katabug Posted May 4, 2024 Author Share Posted May 4, 2024 Thank you so much for that. I'm really new to this scripting stuff and I had no idea how to do this. I'm gonna do some experimenting and see if I can get this working. Thanks again Link to comment Share on other sites More sharing options...
Recommended Posts