← Previous | Next →
getLocalState
Description
Retrieves a local state associated with the NPC and the specific player, then stores it in a local variable within the behavior tree.
Name | Type | Possibilities |
getLocalState | interaction | 1 |
Parameters
# | Name | Type | Mandatory | Description | Multiple |
1 | k | string | Yes | The key of the local state to retrieve. | No |
2 | output | string | Yes | The name of the local variable where the retrieved state will be stored. | No |
Outputs
# | Description |
1 | The only result is 1. |
Example
interaction
getLocalState npc_relationship player_relationship
tell "Your relationship with this NPC is $player_relationship."
behaviour
nothing