Jump to content

Animation missing (Structure)


Recommended Posts

Try as I might, I can't seem to get this animation to appear in game.  It's a heavily modified version of a modded tent, and when I replace "ice_den" in this file (ice_den.lua) with the mod's original name "nanachitent" the visual works.  Does anyone know how to fix the visuals, or what might be wrong?  I'm so close to finally being done with this mod.

ice_den.scml ice_den.zip ice_den.zip nanachitent.zip ice_den.lua

Edited by FurryEskimo
Link to comment
Share on other sites

Ok, so it turns out I needed to open the Spriter file and rename the list of animations from "tent" to "ice_den".  I also renamed the "Tent" animation to anim and edited a line of code at the bottom of the ice_den.lua file from "MakePlacer("ice_den_placer", "ice_den", "ice_den", "idle")" to "MakePlacer("ice_den_placer", "ice_den", "ice_den", "anim")".

Some of the animations now work, but not all of them.  Specifically, it seems like the build animation and break animation are not being used.  I think the animation are being called via code like "inst.AnimState:PushAnimation("idle", true)".  If this is true, it may be as simple as calling the build animation when an instance is constructed.

Link to comment
Share on other sites

Still no luck.  I discovered three lines of key code though.  The first is used when the tent breaks, and seems to control the tent's flaps animating.  The second one makes the build animation play, and the last makes the usual idle animation play until something changes.

inst:Remove()
inst.AnimState:PlayAnimation("place")
inst.AnimState:PushAnimation("idle", true)

I've watched this build animation over and over, and it looks fine in Spriter, but in game the tent's flaps appear in the right place, but the rest of the build animation appears about six feet too high, then clips into place when the idle animation starts.  Still no idea why..

Yeah, so it seems the animation file is totally screwed up.  I've tested the'place' animation multiple times by itself, and the main body of the tent hovers in the air while it animates.  I have no idea what's wrong with it.  Can anyone help?

ice_den.zip ice_den.scml

Link to comment
Share on other sites

Figured it out!  KTool extracts almost all the files correctly, including the animations, but the tent's build, misc, and destroy animation are not.  I needed to edit them by hand, moving the object's position dot to match the actual animation.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...