Skip to main content

onCreate

This event is triggered when an entity is created.

Parameters

NameTypeDescription
entityEntityManagerThe entity that has been created

Example

engine.players.events.on('onCreate', player => {
console.log('A player has been created with id: ' + player.id);
});

Available on: Client Server