Difference between revisions of "AGI Command Reference - Object Description Commands"

From AGI Wiki
Jump to navigationJump to search
(Blanked the page)
 
(10 intermediate revisions by one other user not shown)
Line 1: Line 1:
[[AGI Tutorials|Tutorials Table of Contents]]<br />
 
[[AGI Command Reference|AGI Command Reference Index]]<br />
 
  
<div align="center">
 
Page:
 
[[AGI Command Reference - Arithmetic Commands|1]] |
 
[[AGI Command Reference - Commands to Load and unLoad Resources|2]] |
 
[[AGI Command Reference - Program Control Commands|3]] |
 
[[AGI Command Reference - Object Control Commands|4]] |
 
[[AGI Command Reference - Object Description Commands|5]] |
 
[[AGI Command Reference - Object Motion Control Commands|6]] |
 
[[AGI Command Reference - Inventory Item Management Commands|7]] |
 
[[AGI Command Reference - Picture Resource Management Commands|8]] |
 
[[AGI Command Reference - Sound Resource Management Commands|9]] |
 
[[AGI Command Reference - Text Management Commands|10]] |
 
[[AGI Command Reference - String Management Commands|11]] |
 
[[AGI Command Reference - Initialization Commands|12]] |
 
[[AGI Command Reference - Menu Management Commands|13]] |
 
[[AGI Command Reference - Test Commands|14]] |
 
[[AGI Command Reference - Other Commands|15]] |
 
[[AGI Command Reference - Unknown Commands|16]]
 
</div><br />
 
 
<div align="center"><span style="font-size: 22pt">Object Description Commands</span><br />
 
''By [[Chris Cromer]]''</div>
 
 
&nbsp;
 
 
 
== <br />animate.obj(n); ==
 
 
<blockquote>Object number n is included in the list of object controlled by the interpreter. OBJECTS NOT INCLUDED IN THAT LIST ARE CONSIDERED INEXISTENT!</blockquote>
 
 
== unanimate.all(); ==
 
 
<blockquote>All objects are removed from the control list and are considered inexistent.</blockquote>
 
 
== set.view(n, m); set.view.v(n, m); ==
 
 
<blockquote>Object n is associated with a VIEW resource number m (or pointed to by Var(m)), which may be an image of the object.</blockquote>
 
 
== set.loop(n, m); set.loop.v(n, m); ==
 
 
<blockquote>Chooses a loop m (or Var(m)) in the VIEW resource associated with the object n.</blockquote>
 
 
== fix.loop(n); ==
 
 
<blockquote>Turns off automatic choice of loop number for the object number n.</blockquote>
 
 
== release.loop(n); ==
 
 
<blockquote>Turns on automatic choice of loop number depending on the direction of motion of the object n.
 
 
{|
 
|<pre>
 
        1
 
  8    |    2
 
    \  |  /
 
      \ | /
 
7 -------------- 3  0 - object stands still
 
      / | \
 
    /  |  \
 
  6    |    4
 
        5
 
</pre>
 
|}
 
 
Automatic choice of the loop is done according to the table:
 
 
* for objects with fewer than 4 but more than 1 loops:
 
 
{|
 
<pre>Direction still(0) 1 2 3 4
 
Loop * * 0 0 0 * 1</pre>
 
|}
 
 
* means the current loop number is retained
 
* for objects with more than 4 loops:
 
 
{|
 
<pre>Direction still(0) 1 2 3 4
 
Loop * 3 0 0 0 2 1</pre>
 
|}
 
</blockquote>
 
 
== set.cel(n, m); set.cel.v(n,m); ==
 
 
<blockquote>Selects a cel m in the current loop of the object m.</blockquote>
 
 
== last.cel(n, m); ==
 
 
<blockquote>The number of the last cel of the current loop of the object n is stored in Var(m).</blockquote>
 
 
== current.cel(n, m); ==
 
 
<blockquote>The number of the current cel of the object n is stored in Var(m).</blockquote>
 
 
== current.loop(n, m); ==
 
 
<blockquote>The number of the current loop of the object n is stored in Var(m).</blockquote>
 
 
== current.view(n, m); ==
 
 
<blockquote>The number of the current VIEW resource associated with the object n is stored in Var(m).</blockquote>
 
 
== set.priority(n, m); set.priority.v(n,m); ==
 
 
<blockquote>Set priority of the view of the object n to m (or Var(m)).</blockquote>
 
 
== release.priority(n); ==
 
 
<blockquote>Turns on the automatic priority choice for the object n. The priority is set depending on the vertical coordinate of the object.
 
 
<pre>
 
< y < priority
 
0 48 4
 
48 60 5
 
60 72 6
 
72 84 7
 
84 96 8
 
96 108 9
 
108 120 10
 
120 132 11
 
132 144 12
 
144 156 13
 
156 168 14
 
</pre>
 
 
This way, as an object moves down it approaches the viewer.
 
</blockquote>
 
 
== get.priority(n, m); ==
 
 
<blockquote>The value of the current priority of the object n is stored in Var(m).</blockquote>
 
 
== position(n, x, y); position.v(n, x, y); ==
 
 
<blockquote>Coordinates of the object n, not yet displayed on the screen, are set to x and y (or Var(x) and Var(y)).</blockquote>
 
 
== draw(n); ==
 
 
<blockquote>Object n is shown on the screen. The image uses the values of the loop and the cel in the VIEW resource associated with the object n (see set_view), as well as the priority and coordinates of the object. If a command start_cycling is also issued, an infinite "movie" for the object n is shown until stopped (for example, with stop_cycling).</blockquote>
 
 
== erase(n); ==
 
 
<blockquote>Object n is erased from the screen.</blockquote>
 
 
== get.posn(n, x, y); ==
 
 
<blockquote>Coordinates of the object n are stored in Var(x) and Var(y). Coordinates of the object are coordinates of the base point (bottom left corner) of cels of the VIEW resource associated with the object. Interpreter automatically shows a "movie" (a loop in the VIEW resource) associated with the object, starting at the specified cel. The following commands control this process.</blockquote>
 
 
== start.cycling(n); ==
 
 
<blockquote>Enables automatic change of cels in a chosen (using set_loop) loop of a VIEW resource associated with the object n (using set_view).</blockquote>
 
 
== stop.cycling(n); ==
 
 
<blockquote>Disables automatic change of cels in a chosen (using set_loop_ loop of a VIEW resource associated with the object n (using set_view).</blockquote>
 
 
== normal.cycle(n); ==
 
 
<blockquote>Cels of the loop associated with the object n follow in a normal order: 0, 1, 2, .., k-1, 0, 1, 2..</blockquote>
 
 
== reverse.cycle(n); ==
 
 
<blockquote>Cels of the loop associated with the object n follow in a reverse order: k-1, k-2, ..., 1, 0, k-1, k-2, ..1, 0, ..</blockquote>
 
 
== end.of.loop(n, m); ==
 
 
<blockquote>Plays the loop associated with the object n once, from the current cel to the last. When finished, Flag(m) is set to 1.</blockquote>
 
 
== reverse.loop(n, m); ==
 
 
Plays the loop associated with the object n once in a reverse order, from the current cel to the first. When finished, Flag(m) is set to 1.
 
 
== cycle.time(n, m); ==
 
 
<blockquote>Var(m) sets the time in interpreter cycles between cel changes for the object n. When Var(m) = 1 cels are changed every cycle.</blockquote>
 
 
&nbsp;
 
 
<div align="center">
 
Page:
 
[[AGI Command Reference - Arithmetic Commands|1]] |
 
[[AGI Command Reference - Commands to Load and unLoad Resources|2]] |
 
[[AGI Command Reference - Program Control Commands|3]] |
 
[[AGI Command Reference - Object Control Commands|4]] |
 
[[AGI Command Reference - Object Description Commands|5]] |
 
[[AGI Command Reference - Object Motion Control Commands|6]] |
 
[[AGI Command Reference - Inventory Item Management Commands|7]] |
 
[[AGI Command Reference - Picture Resource Management Commands|8]] |
 
[[AGI Command Reference - Sound Resource Management Commands|9]] |
 
[[AGI Command Reference - Text Management Commands|10]] |
 
[[AGI Command Reference - String Management Commands|11]] |
 
[[AGI Command Reference - Initialization Commands|12]] |
 
[[AGI Command Reference - Menu Management Commands|13]] |
 
[[AGI Command Reference - Test Commands|14]] |
 
[[AGI Command Reference - Other Commands|15]] |
 
[[AGI Command Reference - Unknown Commands|16]]
 
</div><br />
 
 
[[AGI Tutorials|Tutorials Table of Contents]]<br />
 
[[AGI Command Reference|AGI Command Reference Index]]
 
 
<span style="float: left">[[AGI Command Reference - Object Control Commands|&lt; Previous: Object Control Commands]]</span><span style="float: right">[[AGI Command Reference - Object Motion Control Commands|Next: Object Motion Control Commands &gt;]]</span>
 
 
&nbsp;
 
 
[[Category:Commands]]
 
[[Category:References]]
 
[[Category:Tutorials]]
 
[[Category:Objects]]
 

Latest revision as of 19:54, 22 March 2019