AKawaiiTent Posted July 16, 2022 Posted July 16, 2022 (edited) Basicly i'm attempting to make my own version of diverse bodies, but have it only work for the player character, and also only update on sleep. for testing purposes the magiceffect that triggers the body change is tied to a consumed item. I know the body morph works, because i can manually assign a float to it, such as 2.0 and will get the body changes i want when i consume the item. The problem is when i attempt to make a float variable that is determined by the players Strength special. Heres my code. Scriptname AKTBodyChangesEffect extends activemagiceffect Actor property PlayerREF auto ActorValue property Strength auto Const ActorValue property Endurance auto const ActorValue property Charisma auto const ActorValue property Agility auto const ActorValue property Luck auto const ActorValue Property Rads Auto Const Bool BCenabled = true Keyword property aktBC_Keyword auto Event OnEffectStart(Actor playerREF, Actor akCaster) if BCenabled == false debug.notification("You need to enable body changes") utility.Wait(0.1) Else int Gender = playerREF.GetLeveledActorBase().GetSex() If Gender == 0 debug.notification("This mod only works for Female Player Characters") utility.Wait(0.1) Else debug.notification("You feel the drug taking effect on your body") utility.Wait(0.1) debug.notification("your strength is ? " + playerREF.getvalue(Strength) ) utility.Wait(0.1) PlayerBC(playerREF) Endif Endif EndEvent Float function findmySTR() float tempSTR = PlayerRef.GetValue(Strength) return tempSTR / 10 endfunction Function PlayerBC (Actor playerREF) float mySTR = findmySTR() debug.notification("print mySTR " + mySTR) utility.Wait(0.1) BodyGen.SetMorph(playerREF, true, "MuscularArms", aktBC_Keyword, mySTR) BodyGen.SetMorph(playerREF, true, "MuscularLegs", aktBC_Keyword, mySTR) BodyGen.SetMorph(playerREF, true, "Muscular Body", aktBC_Keyword, mySTR) BodyGen.SetMorph(playerREF, true, "MuscularChest", aktBC_Keyword, mySTR) debug.notification("Morphs should have been set") utility.Wait(0.1) BodyGen.UpdateMorphs(playerREF) debug.notification("morphs should have updated") utility.Wait(0.1) EndFunction The main issue that i can tell based on my debug notifs, is playerREF.getvalue(Strength) seems to be returning 0? but i'm really not sure why. Edited July 16, 2022 by AKawaiiTent figured it out
AKawaiiTent Posted July 16, 2022 Author Posted July 16, 2022 (edited) https://www.creationkit.com/fallout4/index.php?title=GetValue_-_ObjectReference here's my refrence and its why i'm so confused. even the Game.GetPlayer().GetValue(Strength) isn't working. Edited July 16, 2022 by AKawaiiTent
AKawaiiTent Posted July 16, 2022 Author Posted July 16, 2022 SOLVED. https://www.creationkit.com/fallout4/index.php?title=GetStrengthAV_-_Game apparently bethesda has very specific getvalue functions for certain actor values.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now