Difference between revisions of "Script/World"

From SF3
Jump to: navigation, search
Line 3: Line 3:
 
    
 
    
 
=== Class Methods ===
 
=== Class Methods ===
 +
==== World Map / Travel ====
 
{| border='0' style ='border:solid 1px #eeeedd; color: black; width: 1200px;background-color: #ffffcc;' cellspacing='0' cellpadding='7'
 
{| border='0' style ='border:solid 1px #eeeedd; color: black; width: 1200px;background-color: #ffffcc;' cellspacing='0' cellpadding='7'
 
|-
 
|-
Line 34: Line 35:
 
|
 
|
 
| style = 'color: #505050; line-height: 0.5;' |''go to the given map in the given setting (or current setting, if not specified)''
 
| style = 'color: #505050; line-height: 0.5;' |''go to the given map in the given setting (or current setting, if not specified)''
 +
|}
 +
 +
==== Dialogues ====
 +
{| border='0' style ='border:solid 1px #eeeedd; color: black; width: 1200px;background-color: #ffffcc;' cellspacing='0' cellpadding='7'
 
|-
 
|-
 
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]]  
 
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]]  
Line 39: Line 44:
 
|-
 
|-
 
|
 
|
| style = 'color: #505050; line-height: 0.5;' |''get the random number generator''
+
| style = 'color: #505050; line-height: 0.5;' |''enable or disable the given dialogue topic''
 
|-
 
|-
 
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]]  
 
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]]  
Line 52: Line 57:
 
|
 
|
 
| style = 'color: #505050; line-height: 0.5;' |''enable a dialogue topic node''
 
| style = 'color: #505050; line-height: 0.5;' |''enable a dialogue topic node''
 +
|}
 +
 +
==== Global Variables ====
 +
{| border='0' style ='border:solid 1px #eeeedd; color: black; width: 1200px;background-color: #ffffcc;' cellspacing='0' cellpadding='7'
 
|-
 
|-
 
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|bool]]  
 
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|bool]]  

Revision as of 08:21, 9 November 2016

class World

The main interface for interacting with the global game state, persistent across all levels.

Class Methods

World Map / Travel

bool IsMapAccessible (const uint _uMapId) const
is the given level currently accessible?
void SetMapAccessible (const uint _uMapId, const bool _bAccessible = true, const uint8 _uSetting = - 1)
set whether the given map is accessible by the player from the world map.
uint8 GetCurrentMapSetting (const uint _uMapId) const
get the current setting for the given map
void SetMapSetting (const uint _uMapId, const uint8 _uSetting)
set the active setting for the given map. the setting change will only take effect the next time the level is visited.
void TravelToMap (const uint _uMapId, const uint8 _uSetting = - 1, const string&in _sEntryPoint = "")
go to the given map in the given setting (or current setting, if not specified)

Dialogues

void EnableDialogueTopic (const string&in _sContainerName, const string&in _sTopicName, const bool _bEnabled)
enable or disable the given dialogue topic
void BlockDialogueTopicNode (const string&in _sContainerName, const string&in _sNodeName)
disable a dialogue topic node
void UnblockDialogueTopicNode (const string&in _sContainerName, const string&in _sNodeName)
enable a dialogue topic node

Global Variables

bool GetGlobalBool (const string&in _sVarName, const bool _bDefault = false) const
get global variable of type bool
int GetGlobalInt (const string&in _sVarName, const int _iDefault = - 1) const
get global variable of type integer
void SetGlobalBool (const string&in _sVarName, const bool _bValue)
set global variable of type bool
void SetGlobalInt (const string&in _sVarName, const int _iValue)
set global variable of type integer

class World

The main interface for interacting with the global game state, persistent across all levels.

Class Methods

bool IsMapAccessible (const uint _uMapId) const
is the given level currently accessible?
void SetMapAccessible (const uint _uMapId, const bool _bAccessible = true, const uint8 _uSetting = - 1)
set whether the given map is accessible by the player from the world map.
uint8 GetCurrentMapSetting (const uint _uMapId) const
get the current setting for the given map
void SetMapSetting (const uint _uMapId, const uint8 _uSetting)
set the active setting for the given map. the setting change will only take effect the next time the level is visited.
void TravelToMap (const uint _uMapId, const uint8 _uSetting = - 1, const string&in _sEntryPoint = "")
go to the given map in the given setting (or current setting, if not specified)
void EnableDialogueTopic (const string&in _sContainerName, const string&in _sTopicName, const bool _bEnabled)
get the random number generator
void BlockDialogueTopicNode (const string&in _sContainerName, const string&in _sNodeName)
disable a dialogue topic node
void UnblockDialogueTopicNode (const string&in _sContainerName, const string&in _sNodeName)
enable a dialogue topic node
bool GetGlobalBool (const string&in _sVarName, const bool _bDefault = false) const
get global variable of type bool
int GetGlobalInt (const string&in _sVarName, const int _iDefault = - 1) const
get global variable of type integer
void SetGlobalBool (const string&in _sVarName, const bool _bValue)
set global variable of type bool
void SetGlobalInt (const string&in _sVarName, const int _iValue)
set global variable of type integer