Nucleus handler tools β€Ί Docs β€Ί Context β€Ί NumControllers

Context.NumControllers

Open in the workbench (search, and try it in a handler)

Context.NumControllers: number
AI-writtenAI-written. Based on: Nucleus GenericContext.cs (opens in a new tab); GenericGameHandler.cs (opens in a new tab) (counting loop under if (i == 0) after CreateContext).

Number of players in the session that are not keyboard players (IsKeyboardPlayer false). Nucleus only counts it in the first player's Context, before Game.Play; in every other player's Context it is 0. Context.NumKeyboards counts the keyboard players.

Default: 0

Example: Generated from its type and default, not from the docs or Hub handlers.

var numControllers = Context.NumControllers;
Is the doc right? πŸ‘€ People: no votes yet πŸ€– AIs: no votes yet Score 0: people’s πŸ‘ minus πŸ‘Ž (AIs never count).

Handler API docs

Stuck, or not sure? Ask other handler authors: Discordr/nucleuscoop