. . . Posted July 9, 2017 Share Posted July 9, 2017 (edited) Hello, I have a problem if someone can help me that would really be nice ! So, I'm wondering if I can make my character use groggy walk anims without adding tag "groggy" to him? Since it causes glitches when he's supposed to become groggy by mandrake & stuff. That's it , have a great day/night ! Edited July 10, 2017 by SuperDavid Link to comment Share on other sites More sharing options...
Lumina Posted July 9, 2017 Share Posted July 9, 2017 I don't know if it could work, but why not just put a degen effect, and a fire anim on your character, rather than the ignite effect ? Link to comment Share on other sites More sharing options...
. . . Posted July 9, 2017 Author Share Posted July 9, 2017 (edited) I just finally found out the fire that spawns on character is called "character_fire" so I can make my own magical fire prefab! Now all I need help with now is how is how can I make my character do groggy walk without the groggy tag Edited July 9, 2017 by SuperDavid Link to comment Share on other sites More sharing options...
JohnWatson Posted July 10, 2017 Share Posted July 10, 2017 i think you can check if a player is groggy with inst.components.grogginess:IsGroggy() Link to comment Share on other sites More sharing options...
Endrew Posted July 10, 2017 Share Posted July 10, 2017 If you buy both sets of jammies and both fuzzy rol skins you get both the /yawn emote and the /sleepy emote. It uses the same animations your character normally makes when under the groggy effect so it's ALMOST the same. Almost. Link to comment Share on other sites More sharing options...
. . . Posted July 10, 2017 Author Share Posted July 10, 2017 What I mean is I want my character to walk/run like like while under the groggy effect without using the "groggy" tag to do so, sorry if I wasn't clear enough! Link to comment Share on other sites More sharing options...
Residays Posted July 10, 2017 Share Posted July 10, 2017 13 minutes ago, SuperDavid said: What I mean is I want my character to walk/run like like while under the groggy effect without using the "groggy" tag to do so, sorry if I wasn't clear enough! That is not a such a big problem, for example, you got a third arm to worry about. Link to comment Share on other sites More sharing options...
Endrew Posted July 10, 2017 Share Posted July 10, 2017 Sounds to me like you want to change the running sprites. I don't really know how to find these things, but what you want to do is locate the drowsy walking sprites, copy them, locate the normal running sprites, and replace them with the drowsy ones. Easier said than done. Link to comment Share on other sites More sharing options...
. . . Posted July 10, 2017 Author Share Posted July 10, 2017 Well so far I got this code in modmain.lua which replaces the run anims with groggy anims, the only problem is it doesn't let the anim finish & keeps replaying it half-way, I don't really have any idea what I'm doing...hopefully someone can nudge me in the correct way . Spoiler AddStategraphPostInit("wilson", function(sg) local _run_onenter = sg.states.run.onenter local function GetRunStateAnim(inst) return (inst.sg.statemem.heavy and "heavy_walk") or (inst.sg.statemem.sandstorm and "sand_walk") or (inst.sg.statemem.groggy and "idle_walk") or (inst.sg.statemem.careful and "careful_walk") or "run" end sg.states.run.onenter = function(inst) _run_onenter(inst) if inst.prefab == "wilson" and inst.AnimState:IsCurrentAnimation(GetRunStateAnim(inst).."_pst") then inst.AnimState:PlayAnimation("idle_walk_pst") elseif inst.prefab == "wilson" and inst.AnimState:IsCurrentAnimation("run") or inst.AnimState:IsCurrentAnimation("run_loop") then inst.AnimState:PlayAnimation("idle_walk") elseif inst.prefab == "wilson" and inst.AnimState:IsCurrentAnimation(GetRunStateAnim(inst).."_pst") then inst.AnimState:PlayAnimation("idle_walk_pre") end end end) Link to comment Share on other sites More sharing options...
Lumina Posted July 10, 2017 Share Posted July 10, 2017 why do you have if inst.prefab == "wilson" and inst.AnimState:IsCurrentAnimation(GetRunStateAnim(inst).."_pst") then inst.AnimState:PlayAnimation("idle_walk_pst") elseif inst.prefab == "wilson" and inst.AnimState:IsCurrentAnimation("run") or inst.AnimState:IsCurrentAnimation("run_loop") then inst.AnimState:PlayAnimation("idle_walk") elseif inst.prefab == "wilson" and inst.AnimState:IsCurrentAnimation(GetRunStateAnim(inst).."_pst") then inst.AnimState:PlayAnimation("idle_walk_pre") end Shouldn't one be _pre then _pre instead of _pst then _pre ? Not sure it will solve your problem. Link to comment Share on other sites More sharing options...
. . . Posted July 10, 2017 Author Share Posted July 10, 2017 Oh, I didn't notice that, but it didn't really affect anything.. I think I'll just use the groggy tag & add some checks if he's groggy or not to remove/add the groggy tag then he can get the actual groggy tag. Since I noticed even if he does groggy walk, he doesn't do groggy idle without the tag. 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