halfrose Posted December 27, 2015 Share Posted December 27, 2015 So I have a custom character that has a clothing build change depending on season I got everything working, it changes property on each season, however, I got a very minor bug, that I am trying to fix the thing is, when the season changes or such, if I leave the server/game and load it again, the character is back at the standard appearance. for coding, I am using this in the character.lua local function WatchSeason( inst, season ) if season == "summer" theninst.AnimState:SetBuild("kossummer") inst.components.combat.damagemultiplier = 2inst.components.locomotor.walkspeed = 5 inst.components.locomotor.runspeed = 7 elseif season == "winter" theninst.AnimState:SetBuild("koswinter") inst.components.combat.damagemultiplier = 1inst.components.locomotor.walkspeed = 4 inst.components.locomotor.runspeed = 6 elseif season == "spring" theninst.AnimState:SetBuild("kingofscience") inst.components.combat.damagemultiplier = 2inst.components.locomotor.walkspeed = 5 inst.components.locomotor.runspeed = 7 elseinst.AnimState:SetBuild("kingofscience") inst.components.combat.damagemultiplier = 2inst.components.locomotor.walkspeed = 5 inst.components.locomotor.runspeed = 7 endendand using this in the master_postinit: inst:WatchWorldState("season", WatchSeason ) WatchSeason( inst, TheWorld.state.season )I am not sure if it is a fixable bug, seeing as, by my guess, it is the 'onload' that is resetting it, though any sort of help would be appreciated. Link to comment https://forums.kleientertainment.com/forums/topic/61452-a-little-help-with-season-change-in-custom-character/ Share on other sites More sharing options...
halfrose Posted December 27, 2015 Author Share Posted December 27, 2015 WELL nevermind, I managed to fix it myself just changed the coding position and it started working fine. Link to comment https://forums.kleientertainment.com/forums/topic/61452-a-little-help-with-season-change-in-custom-character/#findComment-702696 Share on other sites More sharing options...
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