Actions MMF Functions

Action Subgroups

MMF Functions are analogous to Lua Functions, but are called from a Lua function.  An MMF function is defined when an event is created with XLua's On Function condition.  MMF functions can be invoked with the DoCall function in Lua, or invoked directly if the function was explictly registered or auto-registered.  An MMF function can return values back to the calling Lua function in the same manner that parameters can be passed for a Call Lua Function action.  See the section on Lua Functions for more information on parameter types.

An MMF function can be registered under an alternate function group which may have important performance implications in some circumstances.  More information on function groups and when to use them can be found here.

Push Integer Return Value

Pushes an integer return value into a queue, which will be returned to the calling lua function once the current event completes.

Parameters

Value Integer return value

Push Floating Return Value

Pushes a floating-point return value into a queue, which will be returned to the calling lua function once the current event completes.

Parameters

Value Floating-point return value

Push String Return Value

Pushes a string return value into a queue, which will be returned to the calling lua function once the current event completes.

Parameters

String String return value

Push Boolean Return Value

Pushes a boolean return value into a queue, which will be returned to the calling lua function once the current event completes.

Parameters

Value 1 = true, 0 = false

Push NIL

Pushes a nil return value into a queue, which will be returned to the calling lua function once the current event completes.

Parameters

None.

Register MMF Function

Registers a function in lua's global namespace which will call the corresponding On Function triggered event. The function will check that it passes at least as many parameters as you specify.

You may use the global DoCall function in your Lua code as an alternative to registering functions, by passing the function name as the first argument, and the parameters as subsequent arguments.

Parameters

String Function Name
Value Minimum parameter count

Call Lua Function

Directly executes one of your MMF Functions (On Function events). The function does not need to be explicitly registered. Any currently pushed Lua parameters will be passed as MMF parameters, and any returns will be returned as Lua return values.

This action is equivilent to calling a Lua function that only calls another MMF function, and transparently passes the parameters and return values.

Parameters

String Function Name

Copyright 2010 Justin Aquadro