Jump to content

How to become a Spriter master?


Recommended Posts

So I've been doing a LOT of work in Spriter lately and it's probably my new favorite animating program, and I'm pretty sure I have all the basics of the program figured out.

 

But it seems like there's something else I'm missing. Like there are other ways to interact with the animations through code that nobody has really talked about.

If you look through the game code you can see examples of stuff that looks like animations being attached to each other at specific sprite names and stuff like that.

 

For instance; weapons/tools can be attached to a player's hand sprite with "override symbols"

and you can manually hide/show the player's "third arm", the arm for holding weapons/tools.

 

anything that can be held in your hand can be used in an animation, like how you can use a hammer in the axe chopping animation and the animation plays the same way.

 

Can we do this with our own animations? Say I wanted to attach an entirely separate animation to a specific body part of another custom spriter animation. Could I do that? Do I need to set it up some special way to do that?

 

I've combed through the game files for AnimState functions but I can't find the source, so I guess it's another one of those "hard-coded" files like TheSim

 

 

 

and while we're on the topic; can existing animations be rotated? I know about the "FaceDirection" thing but I mean like rotated like spun around. Like a wheel.

Is that a thing? Is there code to do that? It sounds like something that would be a thing. 

Link to comment
Share on other sites

Probably. Use the following code to see a list of functions subsidiary to an object (By which I mean anything that can have a function called from it).

for k,v in pairs(getmetatable(thing)) do print(k,v) end

Note that if you are in 'modmain.lua' or the other files with custom environments, you will need to call 'GLOBAL.getmetatable' instead.

 

The issue is that the folks at Klei are using the Adobe Suite, instead of Spriter. This gives them capabilities we don't have.

Link to comment
Share on other sites

The issue is that the folks at Klei are using the Adobe Suite, instead of Spriter. This gives them capabilities we don't have.

 

 

That's true, those are very different programs. Adobe apparently doesn't even have a proper bone system (Dana Adams discussed this with a dev somewhere on the mod forums).

Though I suspect it's the autocompilers fault we can't properly use OverrideSymbol, just like hiding symbols is made difficult by the renaming to "timeline_x".

 

EDIT:

and while we're on the topic; can existing animations be rotated? I know about the "FaceDirection" thing but I mean like rotated like spun around. Like a wheel.

Is that a thing? Is there code to do that? It sounds like something that would be a thing. 

 

I think the blowdarts do this.

Link to comment
Share on other sites

Probably. Use the following code to see a list of functions subsidiary to an object (By which I mean anything that can have a function called from it).

for k,v in pairs(getmetatable(thing)) do print(k,v) end

 

 

WOAA THIS IS SO USEFUL THANK YOU!

 

the table is huge though and I only get the tail end of it to show up on my screen. Is there any way to "scroll up" through the command line so I can see the rest?

Link to comment
Share on other sites

 

 

I think the blowdarts do this.

 

Woa you're right they do!

 

inst.AnimState:SetOrientation( ANIM_ORIENTATION.OnGround )

 

post-684687-0-27888000-1446568503.png

 

OH MY GOD IT JUST FLATTENS HIM ONTO THE FLOOR LIKE HE'S A CARDBOARD CUTOUT THAT WAS PUSHED OVER ONTO THE GROUND

 

not exactly what I was going for, but it was pretty funny.

 

 

Looking through constats.lua only shows two different orientation options; Default and OnGround.

So it looks like I can't actually rotate any animations with it :(

Link to comment
Share on other sites

uh.. so this is gonna sound dumb but

 

Where do I find the log.txt?

 

Like I've looked everywhere for it in the steam folders but all I can find are the crash logs

 

It does, doubly so! :lol:

 

Link

 

The log is where the game puts all the "print()" and "LUA SCRIPT ERROR CRASH ABORT" for you to check afterwards.

 

EDIT: As for rotation, it's the projectile component: "inst.Transform:SetRotation(0)"

Link to comment
Share on other sites

Oh thanks!

 

 

 

 

EDIT: As for rotation, it's the projectile component: "inst.Transform:SetRotation(0)"

 

Actually, that only changes the "facing direction" (as in, determines if the object is facing forward/left/right/backward)

 

It doesn't actually change it's rotation angle

Link to comment
Share on other sites

Archived

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...