CAOS Language Guide
Creation Commands
|
Macro |
Description |
|
These are the commands that will create a new game presence within the world, when a NEW: object is created it will be TARG, until focus is changed to another object. Make sure that object creation is preceded with INST to make sure the process is uninterrupted. The following explain the values needed for various object creations: imagefile – 4 letter token representing the sprite filename totalinsprite – total number of images in the sprite file numimages – number of images belonging to this object imagenumber – offset of first image associated with this object plane – plot plane for this object between the range of 0=back, 9000=front |
|
|
NEW: SCEN imagefile totalinsprite imagenumber plane |
Creates a scenery object – scenery objects do not need to have a unique classifier. Command only |
|
NEW: SIMP imagefile numimages imagenumber plane clone |
Creates a Simple Object. By default Simple Objects have no ATTRibutes or BeHaViouR defined, these must be set up after creation. clone – 0 is the value normally used and means that all identical objects can use the same image gallery. 1 creates a whole new image gallery for this object, normally only required if that particular object’s image is going to be modified. Command only |
|
NEW: CBTN imagefile numimages imagenumber plane |
Create a call button object. Command only |
|
NEW: COMP imagefile numimages imagenumber clone |
Create a Compound Object. By default it has no parts, these must be set up after creation – Compound Objects need at least one part. Command only |
|
NEW: PART part# relx rely imageoffset plane |
Add a part to the current Compound Object. Should be used immediately after creating a Compound Object to add one or more parts to it. part# is the part number (0-9) relx and rely are the position of the part relative to part 0 imageoffset is the base sprite for this part relative to the first sprite for this object Command only |
|
NEW: VHCL imagefile numimages imagenumber |
Create a vehicle object. Command only |
|
NEW: LIFT imagefile numimages imagenumber |
Create a lift object – lift objects work in conjunction with call buttons to move between floors. Command only |
|
NEW: BKBD imagefile numimages imagenumber backgroundcolour chalkcolour aliascolour textx texty |
Create a blackboard object – blackboard objects are the only ones that can use the BBD: commands designed to teach words and concepts. backgroundcolour, chalkcolour and aliascolour are the colour numbers to use for plotting text. textx and texty are the co-ordinates to place the text plot area relative to part 0 Command only |
|
TOKN abcd |
Convert 4 characters into an integer. This is generally only used for the following commands to reference a string moniker, rather than the integer they require. RValue only |
|
NEW: CREA moniker sex |
Create a new-born creature. moniker is the moniker to use to locate the child’s genome, this should already exist. sex is 1 if male, 2 if female and 0 if randomly determined. Note: the moniker must be supplied as an integer and not a string literal, this allows the moniker to be stored in an object variable. If an explicitly named genome is to be used then the TOKN command should be used. For example, NEW: CREA OV00 0 creates a randomly sexed creature from the moniker stored in ov00. NEW: CREA TOKN ADAM 0 creates a randomly sexed creature from the genome ‘adam.gen’. Command only |
|
NEW: GENE mum dad child |
Create a new genome file from mum’s and dad’s (or just mum if dad=0) genomes, and store the new genomes moniker in the variable child. For example, NEW: GENE TOKN ADAM TOKN EVE_ OV00 will create a child from the genomes ‘adam’ and ‘eve_’ and store the moniker in the variable ov00. Command only |
|
NEW: CBUB imagefile numimages imagenumber stringID |
Create a new Compound bubble object, this is a specialisation of a compound object that has text boxes capable of displaying text from the in-game string table – specified by stringID. Command only |
|
NEW: BBTX textpart relx rely width |
Create a new text part for the current compound bubble object. textpart – 0…9 a unique identifier for the part relx – x position of text part relative to compound bubble rely – y position of text part relative to compound bubble width – width of the text. Note: The text will word-wrap to the width specified, so the height of the box will depend on the length of the string. Command only |