setGlobalState
Description
Sets a global state for the NPC.
Basic information
| Name | Type | Possibilities |
|---|---|---|
| setGlobalState | both | 1 |
Parameters
| # | Name | Type | Mandatory | Description | Multiple |
|---|---|---|---|---|---|
| 1 | k | string | Yes | The key of the state to set. | No |
| 2 | v | any | Yes | The value to set for the given key. | No |
| 3 | npc | NPCID | No | Optional NPC id | No |
Outputs
| # | Description |
|---|---|
| 1 | The only result is 1. |
Example
interaction
setGlobalState npcMood happy
tell "The NPC's mood has been set to happy."
behaviour
nothing