set_nel_var - ryzom/ryzomcore GitHub Wiki


title: Set NeL Variable description: published: true date: 2023-03-12T23:46:13.945Z tags: editor: markdown dateCreated: 2023-03-12T23:46:09.627Z

setNelVar

The setNelVar native AI script function sets the content of a NeL Variable. If the variable does not exist, it will be created.

Syntax

()setNelVar(varId: s, value: f)
()setNelVar(varId: s, value: s)

Arguments

  • varId (string): The name of the variable to set.
  • value (float or string): The value to set the variable to.

Return value

This function does not return a value.

Example

()setNelVar("BotCount", 32);
()setNelVar("BotFamily", "the_killers");

These examples set the value of the NeL variables "BotCount" and "BotFamily", respectively.

⚠️ **GitHub.com Fallback** ⚠️