rex_bcmdqueue
Plugin, ACE table, Discussion thread
Dependence: (optional) official function plugin, or rex_function2 plugin
Dependence: (optional) official function plugin, or rex_function2 plugin
Introduction
A command queue to pend commands.
A command queue to pend commands.
Usage
Add command
Push
Call "Action:Set parameter" to assign parameters of current command, then call "Action:Push" to push this command into back of queue. Current parameters will be cleaned after pushed.
Call "Action:Set parameter" to assign parameters of current command, then call "Action:Push" to push this command into back of queue. Current parameters will be cleaned after pushed.
Run command
Pop
Sample capx
Call "Action:Pop" to pop a command from front of queue. "Condition:On command" will be triggered if the command queue is not empty. Get parameters by "Expression:Param" under "Condition:On command".
Sample capx
Call "Action:Pop" to pop a command from front of queue. "Condition:On command" will be triggered if the command queue is not empty. Get parameters by "Expression:Param" under "Condition:On command".
Next
Sample capx
Call "Action:Next" to get a command and run it by triggering "Condition:On command". Then get parameters by "Expression:Param" under this condition.
There are 2 repeat mode set at "Repeat mode" in properties table
Sample capx
Call "Action:Next" to get a command and run it by triggering "Condition:On command". Then get parameters by "Expression:Param" under this condition.
There are 2 repeat mode set at "Repeat mode" in properties table
- Ring: get command in increasing order until the last command, then start at first command.
- Ping-pong: get command in increasing order until the last command, then turn the direction to decreasing order until the first command.
Export commands
Sample capx
Get commands in JSON string format by "Expression:CmdToString". It could be used to the parameter of "Action:Load JSON commands".
Sample capx
Get commands in JSON string format by "Expression:CmdToString". It could be used to the parameter of "Action:Load JSON commands".
Load commands
Load commands by JSON string
Sample capx
Call "Action:Load JSON commands" to load commands by JSON string, which could be exported by "Expression:CmdToString" in this behavior.
Sample capx
Call "Action:Load JSON commands" to load commands by JSON string, which could be exported by "Expression:CmdToString" in this behavior.
Load commands by CSV string
Sample capx
It also could load commands by CSV string by "Action:Load CSV commands". The format of each command is list below:
Sample capx
It also could load commands by CSV string by "Action:Load CSV commands". The format of each command is list below:
command name, parameter 0, parameter 1, ...
1. Command name : the first cell is command name, just put name string directly since the name is a string type always.
2. Parameter : remainder cells are parameter, the rules are the same as rex_csv plugin.
2. Parameter : remainder cells are parameter, the rules are the same as rex_csv plugin.
- number: 10
- string: 'hi'
- javascript function: Math.random() -- it return a number
Note that. the parameter indexes of these commands will be assigned to 0,1,2..., so that use "Param(0)", "Param(1)", "Param(2)"... to get parameter in event sheet.
Execute command automatically
Sample capx
User could set "Activated" to "Yes", and paste the exported commands (i.e. "Expression:CmdToString") into "Commands" in properties table. The commands will be executed automatically after instance created.
Sample capx
User could set "Activated" to "Yes", and paste the exported commands (i.e. "Expression:CmdToString") into "Commands" in properties table. The commands will be executed automatically after instance created.
Global command handler
User might want to have one command handler for all purposes. For example, there might have more than one command queue behaviors which want to use the same command handlers. Or, reuse these command handlers at other events.
This behavior provides a global command handler which run command handler by official function plugin, or rex_function2 plugin.
User might want to have one command handler for all purposes. For example, there might have more than one command queue behaviors which want to use the same command handlers. Or, reuse these command handlers at other events.
This behavior provides a global command handler which run command handler by official function plugin, or rex_function2 plugin.
Official function object
Sample capx
The index of parameters could only be a series of numbers started at 1 (i.e. 1, 2, 3, 4...). The parameter with index 0 is reserved for passing the UID of this instance by default.
User could assign this parameter (index 0) manually to overwrite this value for special purposes.
Sample capx
The index of parameters could only be a series of numbers started at 1 (i.e. 1, 2, 3, 4...). The parameter with index 0 is reserved for passing the UID of this instance by default.
User could assign this parameter (index 0) manually to overwrite this value for special purposes.
rex_function2 object
Sample capx
The index of parameters could be string or number. The parameter with index "uid" is reserved for passing the UID of this instance by default. See rex_function2 plugin to get more information of this plugin.
User could assign this parameter (index "uid") manually to overwrite this value for special purposes.
Sample capx
The index of parameters could be string or number. The parameter with index "uid" is reserved for passing the UID of this instance by default. See rex_function2 plugin to get more information of this plugin.
User could assign this parameter (index "uid") manually to overwrite this value for special purposes.
Debug panel
User could see the total command count, the index of current executed command, and the command name, parameters of current command in official debug panel.
User could see the total command count, the index of current executed command, and the command name, parameters of current command in official debug panel.