OptionalonCalled just after an announcement was made by the room host.
The announcement message.
The color of the announcement message. Range: -1 <= color < 16777216.
Utils.numberToColor function.-1 means transparent color.The style of the announcement message. Must be one of the following:
The sound of the announcement message. Must be one of the following:
OptionalcustomData: anythe custom data that was returned from the previous callback.
void or a custom data to pass to the next callback.
OptionalonCalled just after an announcement has been sent using the improved announcement api.
The announcement message. ( max length = 1000 )
OptionalcssVar: stringThe cssVar of the announcement message.
Optionalsound: stringThe sound of the announcement message.
OptionaltargetId: numberId of the player who will receive this announcement. If this value is null, the announcement is sent to everyone.
OptionalcustomData: anythe custom data that was returned from the previous callback.
void or a custom data to pass to the next callback.
OptionalonCalled just after the game clock has been paused/resumed.
Whether the game will be paused(1) or resumed(0).
OptionalcustomData: anythe custom data that was returned from the previous callback.
void or a custom data to pass to the next callback.
OptionalonCalled just after game input controls have been modified.
Type of the operation. (0: add, 1: remove)
Parameters for the specific operation.
OptionalcustomData: anythe custom data that was returned from the previous callback.
void or a custom data to pass to the next callback.
OptionalonCalled just after room.directionActive has been changed.
New directionActive value.
OptionalcustomData: anythe custom data that was returned from the previous callback.
void or a custom data to pass to the next callback.
OptionalonCalled just after the current elapsed time has been changed.
New elapsed time value.
OptionalcustomData: anythe custom data that was returned from the previous callback.
void or a custom data to pass to the next callback.
OptionalonCalled just after the current max end ticks has been changed.
New max end ticks value.
OptionalcustomData: anythe custom data that was returned from the previous callback.
void or a custom data to pass to the next callback.
OptionalonCalled just after the current max goal ticks has been changed.
New max goal ticks value.
OptionalcustomData: anythe custom data that was returned from the previous callback.
void or a custom data to pass to the next callback.
OptionalonCalled just after the current max pause ticks has been changed.
New max pause ticks value.
OptionalcustomData: anythe custom data that was returned from the previous callback.
void or a custom data to pass to the next callback.
OptionalonCalled just after the ping values for all players have been updated.
The updated list of ping values for each player in the same order as the player list in the current room's RoomState object.
OptionalcustomData: anythe custom data that was returned from the previous callback.
void or a custom data to pass to the next callback.
OptionalonCalled just after a custom sound has been played.
Name of the sound to be played.
OptionalcustomData: anythe custom data that was returned from the previous callback.
void or a custom data to pass to the next callback.
OptionalonCalled just after the cssVar attribute of a player has been changed.
Id of the player whose cssVar will be modified.
New cssVar value of the player.
OptionalcustomData: anythe custom data that was returned from the previous callback.
void or a custom data to pass to the next callback.
OptionalonCalled just after the energy of an individual player has been altered manually.
Id of the player whose energy values will be modified.
New values. Order of values is supposed to be: [energy, kEnergyGain, kEnergyDrain]. null means no change for each value.
OptionalcustomData: anythe custom data that was returned from the previous callback.
void or a custom data to pass to the next callback.
OptionalonCalled just after a player has changed his/her headless avatar.
Id of the player who triggered this event.
The new headless avatar value.
OptionalcustomData: anythe custom data that was returned from the previous callback.
void or a custom data to pass to the next callback.
OptionalonCalled just after the current skin(textureId) of a player has been updated.
Id of the player whose skin will be modified.
New skin value of the player.
OptionalcustomData: anythe custom data that was returned from the previous callback.
void or a custom data to pass to the next callback.
OptionalonCalled just after the order of players have been changed.
The ids of players that were removed from the room's players list, reordered to match the order in idList and added back to the room's players list.
The ids of players that were removed from the room's players list, reordered to match the order in idList and added back to the room's players list.
Whether to add the players to the top or bottom of the room's players list.
OptionalcustomData: anythe custom data that was returned from the previous callback.
void or a custom data to pass to the next callback.
OptionalonCalled just after the name of the room has been changed.
The new room name.
OptionalcustomData: anythe custom data that was returned from the previous callback.
void or a custom data to pass to the next callback.
OptionalonCalled just after the room's properties have been changed.
The properties that were changed. The current structure of this object is as follows:
props = {
name: string | null,
password: string | null,
fakePassword: boolean | null,
geo: GeoLocation | null,
playerCount: int | null,
maxPlayerCount: int | null
}
Note that only the changed keys will show up in props.
OptionalcustomData: anythe custom data that was returned from the previous callback.
void or a custom data to pass to the next callback.
OptionalonCalled just after room.runDefaultGameLogic has changed.
Whether the default game logic is active(1) or passive(0).
OptionalcustomData: anythe custom data that was returned from the previous callback.
void or a custom data to pass to the next callback.
OptionalonCalled just after a disc's properties have been modified.
The id of player or disc whose disc properties have changed.
The type of object. Must be one of the following:
Must consist of the following properties of the disc in the same order: [x, y, xspeed, yspeed, xgravity, ygravity, radius, bCoeff, invMass, damping].
Must consist of the following properties of the disc in the same order: [color, cMask, cGroup].
OptionalcustomData: anythe custom data that was returned from the previous callback.
void or a custom data to pass to the next callback.
OptionalonCalled just after a new stadium object has been added.
Type of the object to be added.
An object that is supposed to contain all parameters required to add that type of object.
OptionalcustomData: anythe custom data that was returned from the previous callback.
void or a custom data to pass to the next callback.
OptionalonCalled just after an existing stadium object has been removed.
Type of the object to be removed.
Id of the object to be removed.
OptionalcustomData: anythe custom data that was returned from the previous callback.
void or a custom data to pass to the next callback.
OptionalonCalled just after an existing stadium object has been updated.
Type of the object to be updated.
Id of the object to be updated.
An object that is supposed to contain all parameters required to update that type of object.
OptionalcustomData: anythe custom data that was returned from the previous callback.
void or a custom data to pass to the next callback.
OptionalonCalled just after the current team scores has been changed.
Id of the team whose score is desired to be changed.
New score for the team.
OptionalcustomData: anythe custom data that was returned from the previous callback.
void or a custom data to pass to the next callback.
OptionalonCalled just after the current contents of a css variable has been altered.
Name of the css variable..
New value of the css variable.
OptionalcustomData: anythe custom data that was returned from the previous callback.
void or a custom data to pass to the next callback.
These events can only be triggered by the room's host.