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

VII Inventory Item Management Commands

OBJECT resources, stored in a separate file OBJECT, are most often used to represent inventory items. An item is a structure which consists of a one-byte field called room and a string of text, the item name.
If the room field of an item is 255, the item belongs to the player. Otherwise the item is considered to be in the room with the corresponding ID number.
Let us consider item management commands.

get(n); get.v(n);

Stores 255 in room field of an object n, which means the player owns it.

drop(n);

Stores 0 in the room field of object n.

put(n, m); put.v(n, m);

Stores the value m (or Var(m)) in the room field of the object n.

get.room.v(n, m);

Stores the value of the room field of object Var(n) in Var(m).

status();;

The screen is switched to text mode; the top line displays "You are carrying:", then the names of the object with room field equal to 255 are listed. If there are no such objects, the word "nothing" is displayed.
If Flag(13) = 1 (allow item selection), a highlight appears which allows the player to select an item name. When Enter is pressed, the selected object number is stored in Var(25). When Esc is pressed, 255 is stored in Var(25).

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.