Difference between revisions of "ActionScript:ExternalCommands.GetValue"

From Dragon Age Toolset Wiki
Jump to: navigation, search
(Description added.)
(Examples)
 
(One intermediate revision by one other user not shown)
Line 12: Line 12:
 
The attribute name is a string which has meaning to the game engine. It's typically hierarchical, using dots to separate the levels.  
 
The attribute name is a string which has meaning to the game engine. It's typically hierarchical, using dots to separate the levels.  
  
For example, <code>ExternalCommands.GetValue("ClientOptions.VideoOptions.Gamma")</code> would return the gamma setting in the user's DragonAge.ini file.
+
== Examples ==
 +
 
 +
The following would return the gamma setting in the user's DragonAge.ini file:
 +
<dascript>ExternalCommands.GetValue("ClientOptions.VideoOptions.Gamma")</dascript>
 +
 
 +
The following would return the name of the selected character:
 +
<dascript>ExternalCommands.GetValue("GUI.SelectedCharacter.Name")</dascript>
 +
 
 +
Getting the selected characters tag is similar, but with .Tag instead of .Name
 +
 
 +
== Known Issues ==
  
 
If the retrieved value is to be passed back to the game and is a number, you must instead use [[ActionScript:ExternalCommands.GetNumber|GetNumber]] or convert the value back into a Number type first.  
 
If the retrieved value is to be passed back to the game and is a number, you must instead use [[ActionScript:ExternalCommands.GetNumber|GetNumber]] or convert the value back into a Number type first.  

Latest revision as of 05:03, 18 April 2011

A class method of the ExternalCommands ActionScript class.

Returns the requested attribute value from the game engine

GetValue(

a_sAttributeName

);

Parameters:
a_sAttributeName
The hierarchical attribute-string associated with the value to retrieve

Returns:
The requested attribute value from the game engine


Description

The attribute name is a string which has meaning to the game engine. It's typically hierarchical, using dots to separate the levels.

Examples

The following would return the gamma setting in the user's DragonAge.ini file:

ExternalCommands.GetValue("ClientOptions.VideoOptions.Gamma")

The following would return the name of the selected character:

ExternalCommands.GetValue("GUI.SelectedCharacter.Name")

Getting the selected characters tag is similar, but with .Tag instead of .Name

Known Issues

If the retrieved value is to be passed back to the game and is a number, you must instead use GetNumber or convert the value back into a Number type first.