SetFunctionValue

From the Fallout3 GECK Wiki
Revision as of 22:16, 27 May 2014 by imported>Odessa (created)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
< [[::Category:Functions|Category:Functions]]

A function added by the New Vegas Script Extender.

Description

Added by NVSE V4. Used only within the 'Function' block type of a User Defined Function, sets the return value to the specified argument. A UDF may return only a single value, but it may be of any type, including an array.

Syntax

[help]
(Multi) Call Function:UDF args:arg

Example

Begin Function { }

    SetFunctionValue SunnyREF ; * this function simply returns Sunny Smiles

End
Begin Function { }
   
    if GameHour > 12
        SetFunctionValue 1

    elseif PlayerREF.GetAV Strength > 5
        SetFunctionValue 1

    else
        SetFunctionValue 0

    endif

    ; * return true if it is after midday or player has more than 5 strength

End

See Also