CallFunctionCond

From GECK
Jump to: navigation, search


A function added by the New Vegas Script Extender version 6.2.3.

Description

The condition-function equivalent of Call. Calls every UDF script in the specified UDFList formlist, and returns the value returned by the last-called UDF. If no values are returned, then it returns 0.

If the return value is a number (TypeOf == "Number"), then it returns that directly. Otherwise, the value is converted into a boolean. For example, if an array is the last return value, then it returns if the array is valid or not (1 or 0, respectively).

The UDFs are executed in the order they are arranged in the formlist. The "Run On" subject for the condition is passed to the UDF, and can be retrieved using GetSelf/This. No function arguments are passed, so the scripts should begin with:

begin Function { }

If bBreakIfFalse is set to non-zero, then if a UDF returns a false-y value during formlist loop, it will prevent further UDFs from being called and return 0.

Returns 0 when called from a script (not meant for use there).

Syntax

[help]
(lastUDFResult:int) runOnSubject.Call UDFList:FormList bBreakIfFalse:int 

Notes

  • Warning: some conditions are evaluated each frame, while others are not.

See Also