Yankes a while ago posted something about animating armor´s , a script with a image A and B on torso,
does this still works?, i tried it does nothing
ps: im testing in UFO not TFTD
armors:
- type: STR_NONE_UC
spriteSheet: TEST.PCK
spriteScript: |
#remember about proper indent! Because of symbol `|` all things that are currently 6 spaces indented will be treated as text
if eq blit_part BODYPART_TORSO; #do we currently draw torso?
set r0 anim_frame; #we set to register0 value of current frame (its start from 0 to infinity or more accurate MAX_INT)
unit.getId r1; #get id of current unit to register1, used to difference animation offset
add r0 r1; #we add id to animation frame
div r0 4; #reduce animation speed by dividing
mod r0 2; #warp it to have only {0, 1} values
offset r0 8 272; #272 is position of new torsos, this operation change possible values {0, 1} to {272, 280}
add r0 i1; #we add rotation of body from input1 arg
ret r0; #we return offset that will be used for `spriteSheet`
end;
add i0 i1; #default behavior
ret i0;