Nucleus handler tools › Docs › Game › AddOption

Game.AddOption

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

Game.AddOption(
  name: string | number | boolean,
  desc: string | number | boolean,
  key: string | number | boolean,
  value: any,
  defaultValue: any
): void
Game.AddOption(
  name: string | number | boolean,
  desc: string | number | boolean,
  key: string | number | boolean,
  value: any
): void

Adds a user-selectable option to the game profile. Read it back in Game.Play with Context.Options["key"].

✎ AI-written, based on Nucleus GenericGameInfo.cs and GenericGameHandler.cs. Not from the official docs. Is it wrong? Tell us

✎ Parameters: AI-written from the Nucleus source.

Handler API docs

Is this right? Tell us what's wrong
Stuck, or not sure? Ask other handler authors: Discordr/nucleuscoop