Difference between revisions of "Bot Playground/Store/User settings"

From SmartBots Developers Docs
Jump to: navigation, search
Line 6: Line 6:
  
 
[[Image:Store-user-settings-1.png|center|728px]]
 
[[Image:Store-user-settings-1.png|center|728px]]
 +
 +
There are three values you specify:
 +
 +
* the setting variable name as your script sees it (see below)
 +
* the setting "friendly" name as user sees it
 +
* the optional hint for the user
 +
 +
== Accessing user settings from script ==
 +
 +
User setting can be accessed from your script using userSettings object:
 +
 +
<syntaxhighlight language="lsl">
 +
console.log("Using group: " + userSettings.group_name);
 +
</syntaxhighlight>

Revision as of 17:23, 29 August 2022

The most of scripts are supposed to be configurable for the user. The configurable options could be like group name, various messages and such.

Please note that user's bot name is not a setting. User selects the bot while purchasing your script.

Configuring settings

Store-user-settings-1.png

There are three values you specify:

  • the setting variable name as your script sees it (see below)
  • the setting "friendly" name as user sees it
  • the optional hint for the user

Accessing user settings from script

User setting can be accessed from your script using userSettings object:

console.log("Using group: " + userSettings.group_name);