Jump to content

Add a function to get current animation's name if there's not already one

Recommended Posts

I already posted this in the mods and tools area, but I do not know if Klei devs notice that area so I will post this here then hopefully it's noticed.

 I was wondering if there's a function or something like this

inst.AnimState:GetCurrentAnimationName() (not an actual function)

which returns the name of the current animation playing for an inst as a string.


If there's no such code may I recommend Klei devs add such a feature, I do not think it would take too much work and it would allow for some cool new things possibilities for modders to mess around with!

With this information we could easily just play or push the same animation and set the time for any other entity we want. As one of the things we would like to do with this is add a shadow clone effect and add duplicate symbols on entities without editing their animations (such as armor using the entity's head or torso symbols).

Considering we already have IsCurrentAnimation I don't see how this would be hard to implement as it should be a simple modification of that code. Instead of comparing current animation name to our input and returning true we would just return the animation name.

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

  • Create New...