Optional
spawn: booleanOptional
spawn: booleanAdd a player to player data.
// Get an available player ID and add it to the gamedata.
const playerId = room.getAvailablePlayerID();
room.gamedata.add(playerId);
The player ID of the player to add.
Mark a player's task as complete.
// Complete all of a player's tasks.
for (let i = 0; i < player.playerInfo.tasks.length; i++) {
room.gamedata.completeTask(player, i);
}
The player of the tasks to mark complete.
The index of the player's tasks to mark complete.
Get a certain component from the object.
The component class to get.
Make the player data dirty and update on the next FixedUpdate.
The player to make dirty.
Remove player data from the game data.
The player to remove.
Resolve some player identifier to a definite player info object.
A definite player info object.
The player identifier to resolve.
Set the tasks of a player.
room.gamedata.setTasks(player, [
TheSkeldTask.ReactorUnlockManifolds,
TheSkeldTask.ElectricDownloadData,
TheSkeldTask.ShieldsPrimeShields,
TheSkeldTask.NavigationDownloadData
]);
The player to set the tasks of.
The task types to give to the player, see TaskType.
The dirty state of this component.
Flags for this object, see SpawnFlag.
The net ID of this component.
The ID of the owner of this component.
Optional
playerThe player that this component belongs to.
The players in the game data.
The room that this component belongs to.
The type of object that this component belongs to.
Optional
data: HazelReader | GameDataDataGenerated using TypeDoc
Represents a room object containing data about players.
See GameDataEvents for events to listen to.