TheAlphaDehur Posted November 27, 2022 Share Posted November 27, 2022 Hey, hey. I've recently been looking around for examples or methods that would allow a character to play the normal idle animations while they're completely losing it. I did find one example, but it only replaced the animation played when no movement input was made. I toyed around with that, trying to get it to replace the regular idle_sanity_loop with idle_loop. But that didn't pan out all to well either. Is it possible to allow a character to ignore/replace the animations through code, or does it require more work through anim files? Link to comment Share on other sites More sharing options...
Mikrell Posted November 27, 2022 Share Posted November 27, 2022 1 hour ago, TheAlphaDehur said: Hey, hey. I've recently been looking around for examples or methods that would allow a character to play the normal idle animations while they're completely losing it. I did find one example, but it only replaced the animation played when no movement input was made. I toyed around with that, trying to get it to replace the regular idle_sanity_loop with idle_loop. But that didn't pan out all to well either. Is it possible to allow a character to ignore/replace the animations through code, or does it require more work through anim files? You could always remove the ability to move the character then play the anim. Give the player control back once the anim finishes? Link to comment Share on other sites More sharing options...
TheAlphaDehur Posted November 27, 2022 Author Share Posted November 27, 2022 11 hours ago, Mikrell said: You could always remove the ability to move the character then play the anim. Give the player control back once the anim finishes? I wouldn't wanna go that far. Restricting movement for being at low sanity would end badly. All I'd really be after was allowing the character to play the normal idle animations at low sanity instead of the typical low sanity ones. (Holding their heads, looking around scared) I found the example again. 2016 no less, credit to DarkXero. 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) This would stop the 'Looking around, scared' animation in instead play the typical idle animation. But the character would still hold their heads. Link to comment 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