Open main menu

Difference between revisions of "AGIWiki/Animated object"

m
syntax -> souce
m (syntax -> souce)
Line 20: Line 20:
The following example displays an animation of VIEW.004 at (80, 120) on the screen, using object 2:
The following example displays an animation of VIEW.004 at (80, 120) on the screen, using object 2:


<syntax type="C++">
<source lang="cpp">
  animate.obj(o2);
  animate.obj(o2);
  load.view(4);
  load.view(4);
Line 26: Line 26:
  position(o2, 80, 120);
  position(o2, 80, 120);
  draw(o2);
  draw(o2);
</syntax>
</source>


== Cycling objects ==
== Cycling objects ==
Line 123: Line 123:
== Moving objects ==
== Moving objects ==


Each object on screen has a direction it is moving in. This is a numerical value from 0 to 8:
Each object on screen has a direction it is moving in. This is a numerical value from 0 to 8:


When an object is moving normally (and has a direction greater than 0), it will continue moving until it is told to stop, move in another direction, or runs into an obstacle (such as a control line, a block, or another object).
When an object is moving normally (and has a direction greater than 0), it will continue moving until it is told to stop, move in another direction, or runs into an obstacle (such as a control line, a block, or another object).
885

edits