System Messages

There are several pre-defined messages that are sent by the engine:

Create

A Create message is sent when the entity is fully created. All other non-script components are guaranteed to be fully initialized. There are no fields passed in with the Create message.

Destroy

A Destroy message is sent when the entity is destroyed. There are no fields passed in with the Destroy message.

Contact

A Contact message is sent when a Collision or Controller come in contact with each other. Both entities will receive the Contact message.

Format:

otherId - the EntityId of the other entity that was collided with. position - a Vec3 giving the world space position of the contact

AnimationEvent

An AnimationEvent message is sent when an animation playing on the entity passes an event marker. See the documentation on the pipeline for information about how to specify events in an animation.

Format:

name - a string specifying the name of the event in the animation.