Scripting Home
The engine offers a simple scripting interpreter (in commands.js) which reads script to be executed as an array of strings, interprets them and executes functions provided by the library (badengine.js).
The instructions are of the format opcode operands.
Instruction Set
ADD_OBJ ob1 ob2 ... - Adds objects identified by ob1, ob2 etc to the scene.
REMOVE_OBJ ob1 ob2 ... - Removes objects identified by ob1, ob2 from the scene.
START_EVENT ev1 ev2 ... - Start the events identified by ev1, ev2 etc. Adds the events to the current event list.
STOP_EVENT ev1 ev2 ... - Stop the events identified by ev1 ev2 etc. Removes the events from the current event list.
ADD_EXIT door key - Unlocks door identified by door after unlocking it with key and adds the door to the exits of current scene.
ADD_EXIT location - Adds the location location to the exits of current scene.
This list may increase in newer versions if BADAM.