Here is an example of initializing an object that displays cel 2 of loop 1 without animating:
animate.obj(o2); load.view(4); set.view(o2,4); position(o2,80,120); set.loop(o2,1); set.cel(o2,2); draw(o2); stop.cycling(o2);
The objects aren't updated on screen until the start of the next cycle (or until the force.update command is issued), so whatever changes you make to an object's position or appearance do not take affect till then.
Normally when an object is moving around, it's loop number is determined by it's direction:
Direction Loop no --------------------------- 0 (not moving) not changed 1 (up) 3 (if loop 2 and 3 exist) otherwise not changed 2 (up-right) 0 3 (right) 0 4 (down-right) 0 5 (down) 2 (if loop 2 and 3 exist) otherwise not changed 6 (down-left) 1 (if loop 1 exists) otherwise 0 7 (left) 1 (if loop 1 exists) otherwise 0 8 (up-left) 1 (if loop 1 exists) otherwise 0
The direction is only chosen automatically if there are less than 5 loops in the view assigned to the object.
To stop the interpreter from chosing a loop number based on the object's direction, use the fix.loop command. To let it chose the loop number, use the release.loop command.
To play the animation in reverse, use the reverse.cycle command. To play it forwards again, use the normal.cycle command.
To play the animation once and then stop cycling, use the end.of.loop or reverse.loop commands.
See also