rex_scenarioJEngine
Plugin, ACE table, Discussion thread
Dependence:
Dependence:
- official function plugin, or rex_function2 plugin
- (optional) rex_timeline plugin
Introduction
Execute Scenario-Json commands which created from rex_scenarioJEditor plugin.
Scenario-Json is the next generation of rex_scenario plugin.
Execute Scenario-Json commands which created from rex_scenarioJEditor plugin.
Scenario-Json is the next generation of rex_scenario plugin.
Usage
- Load commands by "Action:Append" which created by "Expression:Content" of rex_scenarioJEditor plugin.
- Run commands by "Action:Start". It creates a task running a specific scenarioJ function until the last command of this function.
- "Condition:On any task done" or "Condition:On task done" will be triggered while task has been finished.
Call C2 function
Sample capx (official function) / Sample capx (rex_function2)
Rex_function2 plugin or Official function plugin will be called by commands (script).
Get task name and current scenarioJ function name of caller by "Expression:LastTaskName", "Expression:LastFunctionName".
Sample capx (official function) / Sample capx (rex_function2)
Rex_function2 plugin or Official function plugin will be called by commands (script).
Get task name and current scenarioJ function name of caller by "Expression:LastTaskName", "Expression:LastFunctionName".
Signal
Call "Action:Fire signal" to resume task which is waiting this signal.
Call "Action:Fire signal" to resume task which is waiting this signal.
Access variables
- Local variables are read by "Expression:LocalVar( taskName, variableName )", wrote by "Action:Set local variable", "Action:Add to local variable".
- Task variable are read by "Expression:TaskVar( taskName, variableName )", wrote by "Action:Set task variable", "Action:Add to task variable".
- Global variable are read by "Expression:GlobalVar( variableName )", wrote by "Action:Set global variable", "Action:Add to global variable".
Create task with parameters
Set parameters by "Action:Set parameter", then call "Action:Start" to start a task. Parameters will be passed into the local variable of invoked function.
Or user could set task variables ("Action:Set task variable") or global variables ("Action:Set global variable") before start a task.
Set parameters by "Action:Set parameter", then call "Action:Start" to start a task. Parameters will be passed into the local variable of invoked function.
Or user could set task variables ("Action:Set task variable") or global variables ("Action:Set global variable") before start a task.
Function
"Condition:On function scope changed" will be triggered while jumping into scenarioJ function or go back to previous function. Get current scenarioJ function by "Expression:LastFunctionName". Or get current function name of a specific task by "Expression:LastFunctionName( taskName )".
"Condition:Is function existed" returns true if a specific scenarioJ function is existed.
"Condition:On function scope changed" will be triggered while jumping into scenarioJ function or go back to previous function. Get current scenarioJ function by "Expression:LastFunctionName". Or get current function name of a specific task by "Expression:LastFunctionName( taskName )".
"Condition:Is function existed" returns true if a specific scenarioJ function is existed.
Priority of rex_Function2 and official function
Priority of rex_function2 object is higher then official function object. Or assign the callback of C2 function object by "Action:Setup callback" manually.
Priority of rex_function2 object is higher then official function object. Or assign the callback of C2 function object by "Action:Setup callback" manually.
Save/load
Save/load status only
Sample capx
User could save/load (tasks) status only without saving script.
Sample capx
User could save/load (tasks) status only without saving script.
- Save: get (tasks) status by "Expression:StatusAsJSON", then save this string into storage.
- Load: call "Action:Load status" to load saved status.
Pause/Resume
Sample capx
Call "Action:Pause" to pause count-down timer of a task, which started by "wait time-out" command. Do nothing if timer is counting.
Call "Action:Resume" to resume paused timer.
Sample capx
Call "Action:Pause" to pause count-down timer of a task, which started by "wait time-out" command. Do nothing if timer is counting.
Call "Action:Resume" to resume paused timer.
Load script from editor directly
Sample capx
Call "Action:Append from editor" to load script from a editor object directly. This action will clean the script saved in editor.
Sample capx
Call "Action:Append from editor" to load script from a editor object directly. This action will clean the script saved in editor.