Home | AGI Documentation | AGI Tutorials | AGI Tools | AGI Wiki | Community

AGI Command Reference

This is a tutorial for AGI Programming if you have any questions post them at sciprogramming.com/

Thanks to the Sarien team and to Nick Sonneveld for some info on the unknown commands.

Page: 1 2 3 4 [ 5 ] 6 7 8 9 10 11 12 13 14 15 16

V Object Description Commands

animate.obj(n);

Object number n is included in the list of object controlled by the interpreter. OBJECTS NOT INCLUDED IN THAT LIST ARE CONSIDERED INEXISTENT!

unanimate.all();

All objects are removed from the control list and are considered inexistent.

set.view(n, m); set.view.v(n, m);

Object n is associated with a VIEW resource number m (or pointed to by Var(m)), which may be an image of the object.

set.loop(n, m); set.loop.v(n, m);

Chooses a loop m (or Var(m)) in the VIEW resource associated with the object n.

fix.loop(n);

Turns off automatic choice of loop number for the object number n.

release.loop(n);

Turns on automatic choice of loop number depending on the direction of motion of the object n.

        1
   8    |     2
    \   |   /
      \ | /
7 -------------- 3  0 - object stands still
      / | \
    /   |   \
  6     |     4
        5
Automatic choice of the loop is done according to the table:

- for objects with fewer than 4 but more than 1 loops:

Direction	still(0)	1	2	3	4
Loop	*	*	0	0	0	*	1

* - means the current loop number is retained
- for objects with more than 4 loops:

Direction	still(0)	1	2	3	4
Loop	*	3	0	0	0	2	1

set.cel(n, m); set.cel.v(n,m);

Selects a cel m in the current loop of the object m.

last.cel(n, m);

The number of the last cel of the current loop of the object n is stored in Var(m).

current.cel(n, m);

The number of the current cel of the object n is stored in Var(m).

current.loop(n, m);

The number of the current loop of the object n is stored in Var(m).

current.view(n, m);

The number of the current VIEW resource associated with the object n is stored in Var(m).

set.priority(n, m); set.priority.v(n,m);

Set priority of the view of the object n to m (or Var(m)).

release.priority(n);

Turns on the automatic priority choice for the object n. The priority is set depending on the vertical coordinate of the object.

<	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
This way, as an object moves down it approaches the viewer.

get.priority(n, m);

The value of the current priority of the object n is stored in Var(m).

position(n, x, y); position.v(n, x, y);

Coordinates of the object n, not yet displayed on the screen, are set to x and y (or Var(x) and Var(y)).

draw(n);

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).

erase(n);

Object n is erased from the screen.

get.posn(n, x, y);

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.

start.cycling(n);

Enables automatic change of cels in a chosen (using set_loop) loop of a VIEW resource associated with the object n (using set_view).

stop.cycling(n);

Disables automatic change of cels in a chosen (using set_loop_ loop of a VIEW resource associated with the object n (using set_view).

normal.cycle(n);

Cels of the loop associated with the object n follow in a normal order: 0, 1, 2, .., k-1, 0, 1, 2..

reverse.cycle(n);

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, ..

end.of.loop(n, m);

Plays the loop associated with the object n once, from the current cel to the last. When finished, Flag(m) is set to 1.

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);

Var(m) sets the time in interpreter cycles between cel changes for the object n. When Var(m) = 1 cels are changed every cycle.

Page: 1 2 3 4 [ 5 ] 6 7 8 9 10 11 12 13 14 15 16
 


by helping to defray some of the costs of hosting this site. If it has been of help to you, please consider contributing to help keep it online.
Thank you.
pixe
Top

© 2013 to present The Sierra Help Pages. All rights reserved. All Sierra games, artwork and music © Sierra.