natiny.animator.set_order

Lua
natiny.animator.set_order(animator, order)

Sets where this layer sits in the stack: layers are blended low order first, so a higher one is applied over what the lower ones left.

Parameters

Name Type Description
animator number Animator handle from natiny.animator.create
order integer Signed 32-bit layer order from -2147483648 to 2147483647; initially 0

Example

Lua
--  The wave goes on top of the run.
natiny.animator.set_order(legs, 0)
natiny.animator.set_order(arms, 1)