get_nel_var - ryzom/ryzomcore GitHub Wiki


title: Get NeL Variable description: published: true date: 2023-03-13T00:41:47.912Z tags: editor: markdown dateCreated: 2023-03-13T00:41:44.488Z

getNelVar

The getNelVar native AI script function returns the content of a NeL variable. The variable is created if it doesn't exist.

Syntax

(value: f)getNelVar(varId: s) // getNelVar_s_f
(value: s)getNelVar(varId: s) // getNelVar_s_s

Arguments

  • varId (string): The name of the variable to retrieve.

Return value

  • value (float|string): The content of the variable.

Example

(botCount)getNelVar("BotCount");

This example code retrieves the content of the "BotCount" NeL variable and stores it in the botCount variable.

(botFamily)getNelVar("BotFamily");

This example code retrieves the content of the "BotFamily" NeL variable and stores it in the botFamily variable.

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