Name
CreateAnim -- create animation from a brush (V2.0)
Synopsis
[id] = CreateAnim(id, brush, width, height, frames, fpr[, sx, sy])
Function
This function can be used to create a new animation from a brush source. If you specify Nil in the id argument, this function will choose a vacant identifier for this animation automatically and return it to you. The single frames will be read from the specified brush and will be put together in a new animation. You need to specify the width and height of the frames as well as the number of frames to read from the brush and how many frames are in one row. Optionally, you can define a position from where in the brush the conversion shall start.

If the source brush is transparent, the new animation will also have transparent areas. If the source brush uses an alpha channel, the animation will get an alpha channel, too.

Inputs
id
identifier for the new animation
brush
source brush
width
width of each anim frame
height
height of each anim frames
frames
how many frames should the animation have
fpr
how many frames are in one row; if this is the same than frames, then all frames must be in the same row
sx
optional: x-offset in the source brush (defaults to 0)
sy
optional: y-offset in the source brush (defaults to 0)
Results
id
optional: identifier of the new anim; will only be returned when you pass Nil as argument 1 (see above)

Show TOC