. . . Posted September 5, 2016 Share Posted September 5, 2016 (edited) Hello, I need help . So, the "idle_inaction_sanity" anim glitches with my character's texture making her legs go all weird So... I want to disable it from playing for her. So, I tried doing something like this in SGwilson State{ name = "funnyidle", tags = { "idle", "canrotate" }, onenter = function(inst) if inst.components.temperature:GetCurrent() < 5 then inst.AnimState:PlayAnimation("idle_shiver_pre") inst.AnimState:PushAnimation("idle_shiver_loop") inst.AnimState:PushAnimation("idle_shiver_pst", false) elseif inst.components.temperature:GetCurrent() > TUNING.OVERHEAT_TEMP - 10 then inst.AnimState:PlayAnimation("idle_hot_pre") inst.AnimState:PushAnimation("idle_hot_loop") inst.AnimState:PushAnimation("idle_hot_pst", false) elseif inst.components.hunger:GetPercent() < TUNING.HUNGRY_THRESH then inst.AnimState:PlayAnimation("hungry") inst.SoundEmitter:PlaySound("dontstarve/wilson/hungry") elseif inst.components.sanity:GetPercent() < .5 and not inst:HasTag("amazon") then inst.AnimState:PlayAnimation("idle_inaction_sanity") else return elseif inst:HasTag("groggy") then inst.AnimState:PlayAnimation("idle_groggy01_pre") inst.AnimState:PushAnimation("idle_groggy01_loop") inst.AnimState:PushAnimation("idle_groggy01_pst", false) else inst.AnimState:PlayAnimation("idle_inaction") end end, but that did nothing *cries*... I would really love if someone could help me because I have no idea what i'm doing wrong! Thanks you so much forr reading my problem & have a wonderful day/night !!!! Edited September 5, 2016 by SuperDavid Link to comment https://forums.kleientertainment.com/forums/topic/69991-solved-how-to-disable-certain-idle-from-playing-for-character/ Share on other sites More sharing options...
DarkXero Posted September 5, 2016 Share Posted September 5, 2016 AddStategraphPostInit("wilson", function(sg) local _funnyidle_onenter = sg.states.funnyidle.onenter sg.states.funnyidle.onenter = function(inst) _funnyidle_onenter(inst) if inst:HasTag("amazon") and inst.AnimState:IsCurrentAnimation("idle_inaction_sanity") then inst.AnimState:PlayAnimation("idle_inaction") end end end) Link to comment https://forums.kleientertainment.com/forums/topic/69991-solved-how-to-disable-certain-idle-from-playing-for-character/#findComment-810771 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