Animations

Functions


reg_anim_animate_and_hide

void reg_anim_animate_and_hide(ObjectPtr, int animID, int delay)

Works exactly like reg_anim_animate but the object will automatically disappear after the last animation frame (but not destroyed).

  • delay: delay from the previous animation. A value of -1 will execute the specified animation immediately after the previous one in the sequence ends.

reg_anim_animate_and_move

sfall.h

void reg_anim_animate_and_move(ObjectPtr, int tile, int animID, int delay)

Plays the specified animation while simultaneously moving the object to the given tile.

  • delay: delay from the previous animation. A value of -1 will execute the specified animation immediately after the previous one in the sequence ends.

reg_anim_callback

void reg_anim_callback(procedure proc)

Adds the given procedure to an animation sequence-list and executes it in the registered sequence.


reg_anim_change_fid

void reg_anim_change_fid(ObjectPtr, int FID, int delay)

Should work like art_change_fid_num but in reg_anim sequence.


reg_anim_combat_check

void reg_anim_combat_check(int enable)

Allows enabling all reg_anim_* functions in combat (including vanilla functions) if set to 0. It is automatically reset at the end of each frame, so you need to call it before reg_anim_begin - reg_anim_end block.


reg_anim_destroy

void reg_anim_destroy(ObjectPtr)

Given object is destroyed at the end of current animation set.


reg_anim_light

void reg_anim_light(ObjectPtr, int light, int delay)

Change light of any object. Light argument is a light radius (0-8), but you can use highest 2 bytes to pass light intensity as well (example: 0xFFFF0008 - intensity 65535 and radius 8). If highest 2 bytes are 0, intensity will not be changed. Intensity range is from 0 to 65535 (0xFFFF)


reg_anim_take_out

void reg_anim_take_out(ObjectPtr, holdFrameID, delay)

Plays “take out weapon” animation for given holdFrameID. It is not required to have such weapon in critter’s inventory.


reg_anim_turn_towards

void reg_anim_turn_towards(ObjectPtr, int tile/target, delay)

Makes object change its direction to face given tile number or target object.