Difference between revisions of "GetItemValue"

From GECK

(this does not work when called in ref.func, it needs to be func ref only.added example)
(clarified)
Line 1: Line 1:
 
{{Function
 
{{Function
 
  |origin = FOSE1
 
  |origin = FOSE1
  |summary = Returns the base value of the object.
+
  |summary = Returns the base value of the specified object or [[calling reference]].
 
  |name = GetItemValue
 
  |name = GetItemValue
 
  |alias = GetValue
 
  |alias = GetValue
 
  |returnType = int
 
  |returnType = int
  |referenceType =
+
  |referenceType = ref
 
  |arguments =  
 
  |arguments =  
 
   {{FunctionArgument
 
   {{FunctionArgument
 
   |Name = item
 
   |Name = item
 
   |Type = ref
 
   |Type = ref
 +
  |Optional = y
 
   }}
 
   }}
 
}}
 
}}
 
==Example==
 
==Example==
 
<pre>
 
<pre>
int iTotal
+
int iValue
ref rItem
+
  
let rItem := SomeItem
+
set iValue to GetValue Weap10mmPistol
 
+
let iTotal += (GetValue rItem)
+
 
+
; * replace let with 'set .. to ..' if not using NVSE 4.
+
 
</pre>
 
</pre>
==See Also==
 
[[Let]]
 
 
[[Category:Functions_(FOSE)]]
 
[[Category:Functions_(FOSE)]]

Revision as of 11:47, 1 September 2014

A function added by the Fallout Script Extender.

Description

Returns the base value of the specified object or calling reference.

Syntax

(int) ref.GetItemValue item:ref 

Or:

(int) ref.GetValue item:ref

Example

int iValue

set iValue to GetValue Weap10mmPistol
Personal tools