rex_MPsyncfunction
Introduction
Trigger "On function" for each peer like using function object. Actually, the interface of function is referenced to rex_function2 plugin.
This is an advance plugin, user still need to know how to use the official multi-player plugin first.
Trigger "On function" for each peer like using function object. Actually, the interface of function is referenced to rex_function2 plugin.
This is an advance plugin, user still need to know how to use the official multi-player plugin first.
Call function
Like rex_function2 plugin, this plugin also has 2 kinds of interface of function call. One is using parameter list, the other is using parameter table.
Like rex_function2 plugin, this plugin also has 2 kinds of interface of function call. One is using parameter list, the other is using parameter table.
Parameter list
Call "Action:Call function" in "Parameter list" category to assign parameters in a list, like official function object.
Call "Action:Call function" in "Parameter list" category to assign parameters in a list, like official function object.
Parameter table
Call "Action:Set parameter" to assign value with a string or number index for each parameter. Then call "Action:Call function" in "Parameter table" category, like rex_function2 object.
Call "Action:Set parameter" to assign value with a string or number index for each parameter. Then call "Action:Call function" in "Parameter table" category, like rex_function2 object.
On function
After call a function, the "Condition:On function" will be triggered for each peer. There are 2 modes to trigger this condition, "Immediate", "Sendback".
The alias of sender could be got by "Expression:SenderAlias" under "Condition:On function".
After call a function, the "Condition:On function" will be triggered for each peer. There are 2 modes to trigger this condition, "Immediate", "Sendback".
- Immediate : trigger "Condition:On function" immediate. It has no delay of responding, but the execution order of each peer might not be the same.
- Sendback : trigger "Condition:On function" while the package sent from host. The execution order will be the same for each peer, but it has a network delay.
The alias of sender could be got by "Expression:SenderAlias" under "Condition:On function".
Declare parameters
User need to declare parameters if using parameter table by call "Action:Declare parameter". See the document of rex_function2 for more detail.
User need to declare parameters if using parameter table by call "Action:Declare parameter". See the document of rex_function2 for more detail.
Parameter indexes
- The parameters could be got by number index 0,1,2,... in parameter list mode.
- The parameters could be got by string or number index in parameter table mode. Remember to declare parameters if using string index.
Call official function object or rex_function2 object
This plugin will also trigger "Condition:On function" of official function object or rex_function2 object, after trigger "Condition:On function" of this plugin, with the same function name and parameters.
User could develop game without multi-player supported (i.e. standalone) by using official function object or rex_function2 object, then replaces "Action:Call function" of official function object or rex_function2 object to this plugin's.
This plugin will also trigger "Condition:On function" of official function object or rex_function2 object, after trigger "Condition:On function" of this plugin, with the same function name and parameters.
User could develop game without multi-player supported (i.e. standalone) by using official function object or rex_function2 object, then replaces "Action:Call function" of official function object or rex_function2 object to this plugin's.
Pending mode
Command need to be executed at right time. Consider this case at below figure
Command need to be executed at right time. Consider this case at below figure
It might cause an error that peer B receives command and run it before "Process stage" finished. This command should be executed during "Input stage". So that this command need to be pending until "input stage" shown at blow figure.
To use blocking mode to pending command, set "Blocking mode" to "Yes" in properties table. The received command will be pended until call "Action:Accept" in "Pending" category.
When call "Action:Accept" -
When call "Action:Accept" -
- Pop and run a command if there has any pending command already
- Run a command when received, then pending others
Ignored list
Call "Action:Add" in "Pending - ignored list" category to exclude blocked commands by function name. For example, chat command might be run at all times, it could be add to ignored list to run it directly without any checking.
"Action:Remove" in "Pending - ignored list" category could remove this function from ignored list.
Call "Action:Add" in "Pending - ignored list" category to exclude blocked commands by function name. For example, chat command might be run at all times, it could be add to ignored list to run it directly without any checking.
"Action:Remove" in "Pending - ignored list" category could remove this function from ignored list.
Trace the execution of commands
"Condition:On any function" will be triggered by all executed commands. Trace the execution of these commands by "Expression:FunctionName", and "Expression:FunctionParams" at "action:Log" of official browser object.
"Condition:On any function" will be triggered by all executed commands. Trace the execution of these commands by "Expression:FunctionName", and "Expression:FunctionParams" at "action:Log" of official browser object.