Method::SetOutputValue
Defined in:
Sets the output value for a method.
C4Methods.h
Prototype
void SetOutputValue(const ScriptState *state, bool value);
void SetOutputValue(const ScriptState *state, int32 value);
void SetOutputValue(const ScriptState *state, float value);
void SetOutputValue(const ScriptState *state, const char *value);
void SetOutputValue(const ScriptState *state, const ColorRGBA& value);
void SetOutputValue(const ScriptState *state, const Vector3D& value);
Parameters
state |
A pointer to the current script state. |
value |
The output value for the method. |
Description
The SetOutputValue
function sets the output value for a method. This function should be called from within the overridden Method::ExecuteMethod
function for script methods that need to specify an output value. The output value is stored in the method's output variable (after a possible type conversion) if the output variable has been specified and exists in the script. Otherwise, the output value is simply discarded. In any case, the method's boolean result is automatically set by converting the output value to a boolean value.The
state
parameter should be set to the same value passed into the state
parameter of the Method::ExecuteMethod
function.
See Also