Difference between revisions of "AGIWiki/Animated object"

Jump to navigation Jump to search
m
Text replacement - "</source>" to "</syntaxhighlight>"
m (Text replacement - "</source>" to "</syntaxhighlight>")
 
(2 intermediate revisions by 2 users not shown)
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++">
<syntaxhighlight 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>
</syntaxhighlight>


== 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).
TrustedUser
2,147

edits

Navigation menu