. . . Posted April 11, 2017 Share Posted April 11, 2017 (edited) Hello, I need some help ! So...is it possible to mirror/fip an animation through Spriter? Like I made an animation, but realized I want it to face the opposite way..would I have to redo the entire thing from scratch all over again ? Edited April 13, 2017 by SuperDavid Link to comment Share on other sites More sharing options...
. . . Posted April 14, 2017 Author Share Posted April 14, 2017 Bump Link to comment Share on other sites More sharing options...
Lumina Posted April 14, 2017 Share Posted April 14, 2017 If your anim isn't too complex, maybe adding a - sign before the x-scale could revert the direction of the object. Depending of the anim it could be enough, but i doubt it... Link to comment Share on other sites More sharing options...
. . . Posted April 14, 2017 Author Share Posted April 14, 2017 Dang, I tried that & it wasn't in the center anymore when I did that... Does that mean there's no other way to flip it? Link to comment Share on other sites More sharing options...
Aquaterion Posted April 14, 2017 Share Posted April 14, 2017 I'm thinking of ways to do it but I think most of them would just break the animation, perhaps u could upload this .scml file and the related images so i could try? Link to comment Share on other sites More sharing options...
. . . Posted April 14, 2017 Author Share Posted April 14, 2017 (edited) Well, basically it's actually just the death anim I'm trying to flip then I can play it alongside the wakeup anim for a "stun" anim without having to create one from scratch. Here it is, it's the one called "collapse", I tried putting - at the x part, but it would get a little weird-ish so I don't know what to do, so I really appreciate your assistance man ! anim.zip And thanks for your reply/help Aquaterion !! Edited April 14, 2017 by SuperDavid Link to comment Share on other sites More sharing options...
Aquaterion Posted April 14, 2017 Share Posted April 14, 2017 The Animation is a bit too complicated to be able to manually fix. However maybe you could possibly make the player X scale -1 ingame while he/she is collapsing? Link to comment Share on other sites More sharing options...
. . . Posted April 14, 2017 Author Share Posted April 14, 2017 1 minute ago, Aquaterion said: However maybe you could possibly make the player X scale -1 ingame while he/she is collapsing? Do you maybe know how I would do that ? Link to comment Share on other sites More sharing options...
Aquaterion Posted April 14, 2017 Share Posted April 14, 2017 I remembered seeing your collapse stategraph in another post so I just added to it: local collapse = State { name = "collapse", tags = { "busy", "pausepredict", "nomorph", "collapsed" }, onenter = function(inst) --inst.Physics:Stop() local sX, sY, sZ = inst.Transform:GetScale()--1. Get current scale inst.Transform:SetScale(-sX, sY, sZ)--2. flip the X axis inst.AnimState:PlayAnimation("death") if not inst:HasTag("mime") then inst.SoundEmitter:PlaySound((inst.talker_path_override or "dontstarve/characters/")..(inst.soundsname or inst.prefab).."/death_voice") end if inst.components.playercontroller ~= nil then inst.components.playercontroller:RemotePausePrediction() end end, timeline = { TimeEvent(45 * FRAMES, function(inst) local rotat = inst.Transform:GetRotation() + pi if rotat > pi and rotat <= pi*2 then print(tostring(rotat).." left") inst.Transform:SetRotation(-pi/2) else print(tostring(rotat).." right") inst.Transform:SetRotation(pi/2) end local sX, sY, sZ = inst.Transform:GetScale()--3. Get current scale inst.Transform:SetScale(-sX, sY, sZ)--4. reflip the X axis inst.AnimState:PlayAnimation("wakeup") end), TimeEvent(55 * FRAMES, function(inst) inst.sg:RemoveStateTag("busy") inst.sg:RemoveStateTag("collapsed") end), }, events = { EventHandler("animover", function(inst) if inst.AnimState:AnimDone() then inst.sg:GoToState("idle") end end), }, } Link to comment Share on other sites More sharing options...
. . . Posted April 14, 2017 Author Share Posted April 14, 2017 (edited) It seems like nothing different really happened, at least from what I can notice Thanks for your help though Aquaterion ! Edit: Maybe it's cause I'm using a newer collapse state? ...though they're practically the same, so probably not Spoiler local pi = GLOBAL.PI local degrees = GLOBAL.DEGREES local collapse = State { name = "collapse", tags = { "busy", "pausepredict", "nomorph", "collapsed" }, onenter = function(inst) inst.AnimState:PlayAnimation("death") if not inst:HasTag("mime") then inst.SoundEmitter:PlaySound((inst.talker_path_override or "dontstarve/characters/")..(inst.soundsname or inst.prefab).."/death_voice") end if inst.components.playercontroller ~= nil then inst.components.playercontroller:RemotePausePrediction() end end, timeline = { TimeEvent(45 * FRAMES, function(inst) local rotat = inst.Transform:GetRotation() + pi if rotat > pi and rotat <= pi*2 then print(tostring(rotat).." left") inst.Transform:SetRotation(-pi/2) else print(tostring(rotat).." right") inst.Transform:SetRotation(pi/2) end inst.AnimState:PlayAnimation("wakeup") end), TimeEvent(55 * FRAMES, function(inst) inst.sg:RemoveStateTag("busy") inst.sg:RemoveStateTag("collapsed") end), }, events = { EventHandler("animover", function(inst) if inst.AnimState:AnimDone() then inst.sg:GoToState("idle") end end), }, } local function SGWilsonPostInit(sg) sg.states["collapse"] = collapse end AddStategraphState("SGwilson", collapse) AddStategraphPostInit("wilson", SGWilsonPostInit) Edited April 14, 2017 by SuperDavid Link to comment Share on other sites More sharing options...
. . . Posted April 16, 2017 Author Share Posted April 16, 2017 bumpitty bump-o Link to comment Share on other sites More sharing options...
. . . Posted April 18, 2017 Author Share Posted April 18, 2017 So, I'm guessing this is impossible to achieve, right...? Link to comment Share on other sites More sharing options...
Lumina Posted April 18, 2017 Share Posted April 18, 2017 Not one i'm aware of, but maybe you could do a general search about spriter itself on google and see if you find something. Because the program isn't used only for don't starve so maybe you'll find more outside 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