Difference between revisions of "Pool Target References"

From HLKitWiki
Jump to: navigation, search
Line 5: Line 5:
 
:{| class="infotable"
 
:{| class="infotable"
 
|class="leftnormal"|name
 
|class="leftnormal"|name
|(Right, String)  
+
|(Right, String) Returns the name assigned to the usage pool.<br>
 +
Example: result = this.name
 
|-
 
|-
 
|abbrev
 
|abbrev
|(Right, String)  
+
|(Right, String) Returns the abbreviation assigned to the usage pool.<br>
 +
Example: result = this.abbrev
 
|-
 
|-
 
|count
 
|count
|(Right, Number)  
+
|(Right, Number) Returns the number of historical entries that currently exist within the usage pool.<br>
 +
Example: result = this.count
 
|-
 
|-
 
|value
 
|value
|(Right, Number)  
+
|(Right, Number) Returns the net adjusted value for the usage pool, after applying all of the adjustments that have been assigned.<br>
 +
Example: result = this.value
 
|-
 
|-
 
|empty
 
|empty
|(Right, Number)  
+
|(Right, Number) Discards all adjustments for the usage pool and resets the value to its initial default. Always returns a value of zero.<br>
 +
Example: perform this.empty
 
|-
 
|-
 
|set[''value'']
 
|set[''value'']
Line 26: Line 31:
 
|-
 
|-
 
|rollback
 
|rollback
|(Right, Number)  
+
|(Right, Number) Rolls back (i.e. undoes) the last adjustment that was applied to the usage pool. Always returns a value of zero.<br>
 +
Example: perform this.rollback
 
|-
 
|-
 
|history[''index'']
 
|history[''index'']

Revision as of 21:14, 6 December 2008

Context: HL KitKit Reference … Target References 

The "pool" script context corresponds to the contents of a usage pool, whether it be associated with a pick or directly on the actor. The complete list of target references for usage pools is presented in the table below.

name (Right, String) Returns the name assigned to the usage pool.

Example: result = this.name

abbrev (Right, String) Returns the abbreviation assigned to the usage pool.

Example: result = this.abbrev

count (Right, Number) Returns the number of historical entries that currently exist within the usage pool.

Example: result = this.count

value (Right, Number) Returns the net adjusted value for the usage pool, after applying all of the adjustments that have been assigned.

Example: result = this.value

empty (Right, Number) Discards all adjustments for the usage pool and resets the value to its initial default. Always returns a value of zero.

Example: perform this.empty

set[value] (Right, Number)
adjust[value] (Right, Number)
rollback (Right, Number) Rolls back (i.e. undoes) the last adjustment that was applied to the usage pool. Always returns a value of zero.

Example: perform this.rollback

history[index] (Right, Number)