Scripted object events
An event is a script function that is called by the Novelty engine when a certain condition is met. In programming terms it works like a callback. The difference is that events are specifically associated with objects. Take a look at the following code:
event MyEvent.OnUpdate { // Do something }
An event's body starts with the keyword event. Next there's the name of the event, in this case MyEvent, followed by a dot and the event type, OnUpdate. Unlike regular functions, there are no parentheses.
Associating events with objects
If you compile the code above, Novelty will recognize it as an event and you can associate objects to it. You do this in the object's properties, under Scripted events.

Fig 1: Associating an event to an object
In this example, we've associated MyEvent.OnUpdate with an object, which means the code will be called every frame for that object.
Event parameters
Besides being called by the engine, events are also being passed one or more parameters. The parameters that are being passed depends on the event type, but one of them is always self which is an Object handle that points to the object that was associated with the event. This let's us manipulate the scene on a per-object basis.
event MyEvent.OnUpdate { // Move object 1 pixel to the right each frame self.position.x += 1; }
Another parameter that is specifically passed to OnUpdate events is elapsed, which is a float value of the time passed since the last update. This gives us a little bit more control.
event MyEvent.OnUpdate { // Move object 100 pixels/second to the right self.position.x += 100 * elapsed; }
Automatic association
Objects are automatically associated to events with the same name, so an object named MyObject will be automatically associated with MyObject.OnUpdate, MyObject.OnShow and so forth.