Behavior : Function2

Author:Rex.Rainbow

Download

Properties

Debug mode

  • Enable to show log.
    • Options : ["Off","On"]

Actions

Function

Action:Call expression

  • Call a function using a typed expression (via Function.Call()).
    • Expression ( number or string ) : An expression to run, generally of the form Function.Call("func", ...)

Interface

Action:Declare parameter

  • Declare input parameter in name string and it's default value
    • Name ( string ) : Parameter's name
    • Value ( number or string ) : The default value.
    • Type check ( Combo ) : Type check.
      • Options : ["","number only","string only"]

Log

Action:Dump

  • Dump function infomation in console, it need turn on debug mode.

Parameter table

Action:Set parameter

  • Set a parameter table.
    • Name ( number or string ) : Name of parameter
    • Value ( number or string ) : Value
    • Table ( string ) : Name of parameter table.

Action:Call function

  • Call a function, running its 'On function' event with parameter table.
    • Name ( string ) : The name of the function to call.
    • Table ( string ) : Name of parameter table.

Return

Action:Set return value

  • In an 'On function' event, set the return value.
    • Value ( number or string ) : A number or some text to return from the function call.

Return: dictionary

Action:Set return value

  • In an 'On function' event, set the return value in a dictionary.
    • Name ( string ) : Parameter's name
    • Value ( number or string ) : A number or some text to return from the function call.

Expressions

Function

Expression:ReturnValue

  • Get the value set by 'Set return value'. Add 2nd parameter for key and/or 3rd parameter for default value if key doesn't exist.

Expression:ParamCount

  • Get the number of parameters passed to this function.

Expression:Param

  • Get the value of a parameter passed to the function.
    • Index ( number or string ) : The zero-based index of the parameter to get, or name in string.

Expression:Call

  • Call a function with parameters and return its return value.
    • Name ( string ) : The name of the function to call.

Expression:CallwPT

  • Call a function with parameter table and return its return value.
    • Name ( string ) : The name of the function to call.

Conditions

Function

Condition:On function

  • Triggered when a function is called.
    • Name ( string ) : The name of the function that is being called.

Parameter

Condition:Compare parameter

  • Compare the value of a parameter in a function call.
    • Index ( number or string ) : The zero-based index of the parameter to get, or name in string.
    • Comparison ( cmp ) : How to compare the function parameter.
    • Value ( number or string ) : The value to compare to.

Condition:Type of parameter

  • Test the type of parameter.
    • Index ( number or string ) : The zero-based index of the parameter to get, or name in string.
    • Type ( Combo ) : The type of value.
      • Options : ["Number","String"]