General Syntax

- All commands on one line separated by commas.
(note that BobCob automatically places each command on a separate line for easy viewing)
- a single space between every operand
- a single comma (no space) between every command (this will not be visible in BobCob)
- square brackets round strings e.g. [filespec]
- All opcodes must be lowercase
- labels should be lower case, exactly 4 chars long
- object names should be exactly 4 chars long, case does not matter

LVALUE, object operands:
NOTE: the HandleActivate() functions *assume* success, and therefore
change the activity status of the object automatically (to ACTIVE1 etc).
I only need use this command if I need to *override* the change, for
example, 'one-shot' activations (for example an obj that just makes a
sound when clicked on) should deactivate themselves at the end of the
macro, otherwise further activations will be suppressed, since the object
is now permanently ACTIVE.

 

Below is a table showing the COB file structure:

BYTE DESCRIPTION
01 Always (?)
has values:
01
02 00
03 number of objects available (perhaps not using byte 04)
04
05 month Date of expiration
(set to 00 to make "immortal")
06
07
08
09 day
10
11
12
13 year
14
15
16
17 Number of scripts
18
19 Number of imports (usually one - the INST section)
20
21 Number of objects used
22
REST
OF
COB 
Script Strings Byte 1 = Length of string. If FF then bytes 3&4 determine length
Import Strings Byte 1 = Length of string. If FF then bytes 3&4 determine length
Image Data 01 Width
02
03
04
05  Height
06
07
08
09 2-byte width repeated (?)
10
11 (If width/height are 0, there will be no data) Same as .spr sprite image data, but with the rows in reverse order, (upside-down); note that the columns still go left to right.
Object Name String Byte 1 = Length of string. If FF then bytes 3&4 determine length
0 - one byte