set_global_nel_var - ryzom/ryzomcore GitHub Wiki


title: Set Global NeL Variable description: published: true date: 2023-03-13T00:58:13.177Z tags: editor: markdown dateCreated: 2023-03-13T00:58:10.181Z

setGlobalNelVar

The setGlobalNelVar native AI script function sets the content of a NeL Variable in the global scope. The variable is created if it doesn't exist.

Syntax

()setGlobalNelVar(varId: s, value: f) // setGlobalNelVar_sf_
()setGlobalNelVar(varId: s, value: s) // setGlobalNelVar_ss_

Arguments

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

Example

()setGlobalNelVar("BotCount", 32);

This example code sets the "BotCount" NeL Variable to 32 in the global scope.

()setGlobalNelVar("BotFamily", "the_killers");

This example code sets the "BotFamily" NeL Variable to "the_killers" in the global scope.

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