Messaging
The engine uses messages for interacting with instances.
For example an instance of type switch might listen for message 8388753
to change the state of the switch.
Message handler
Each instance has a message handler function, these are assigned by object type.
The message handler is called when a message is posted to an instance, like by calling INSTANCE_Post(lever, 8388753, 1)
.
The message handler function can change depending on the state of the object.