Skip to content

← Previous | Next →


getGlobalState

Description

Retrieves a global state associated with the NPC and stores it in a global variable within the behavior tree."

Basic information

Name Type Possibilities
getGlobalState both 1

Parameters

# Name Type Mandatory Description Multiple
1 k string Yes The key of the global state to retrieve. No
2 output string Yes The name of the global variable where the retrieved state will be stored. No

Outputs

# Description
1 The only result is 1.

Example


  interaction 
    getGlobalState npc_hapiness npc_hapiness 
      tell "Im like $npc_hapiness% happy." 

  behaviour 
    nothing