remoteExecCall: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
m (Text replacement - "{{HashLink" to "{{Link")
 
(164 intermediate revisions by 16 users not shown)
Line 1: Line 1:
[[Category:Scripting_Commands_Arma_3]]
{{RV|type=command
[[Category:Arma_3:_New_Scripting_Commands_List]]
{{Command|= Comments
____________________________________________________________________________________________


| arma3dev |= Game name
|game1= arma3
|1.46|= Game version
|version1= 1.50


____________________________________________________________________________________________
|gr1= Multiplayer


| Asks server to execute a command remotely by [[call]]ing it. |= Description
|descr= [[Scheduler|Unscheduled]] version of [[remoteExec]]. The only difference between [[remoteExec]] and [[remoteExecCall]] is that [[remoteExecCall]] will run '''functions''' in [[Scheduler#Unscheduled Environment|unscheduled environment]].
____________________________________________________________________________________________
{{Feature|important|
The "Call" in [[remoteExecCall]] only means that the remote execution will take place in [[Scheduler#Unscheduled Environment|unscheduled environment]] and does '''not''' mean it will happen right away (see {{Link|#Example 3}}).}}


| [[remoteExecCall]] unit|= Syntax
|s1= see [[remoteExec]]


|p1= '''functionName''': [[String]] - function name. While any function can be used, only commands defined in ''[[CfgRemoteExecCommands]]'' are supported. |=
|p1= see [[remoteExec]]
|p2= '''target''': - Optional. [default: 0]
: [[Object]] - function will be executed only where unit is local [default: everyone]
: [[Number]] - the function will be executed only on client with the given [[owner]] ID. When 0, the function will be executed on each client including the one where remoteExec was called from. When 2, it will be executed only by server. When negative, it will be executed everywhere except for machines with with the given client ID.
: [[Side]] - the function will be executed only on clients where the player is on the specified side
: [[Group]] - the function will be executed only on clients where the player is in the specified group
: [[Array]] - array of any of types listed above
|=
|p3= '''JIP_id''': [[String]] - Optional. If set, it is used as an unique identifier of this remoteExec call in the JIP queue. [default: ""] |=


| [[Nothing]] |= Return value
|r1= see [[remoteExec]]
____________________________________________________________________________________________
 
|x1= <code>"hint" [[remoteExecCall]] ["hello", 0]; // runs hint "hello" on each connected client </code> |= Example 1
|x2= <code>"hint" [[remoteExecCall]] ["hello", 3]; // runs hint "hello" on first connected client </code> |= Example 2
|x3= <code>"hint" [[remoteExecCall]] ["hello", -2]; // runs hint "hello" everywhere but server </code> |= Example 3
|x4= <code>"hint" [[remoteExecCall]] ["hello", -2, "IamUnique"];
// runs hint "hello" everywhere but server and puts the message into the JIP queue.
// Everytime new players connects, "hello" message will be displayed for them </code> |= Example 4


____________________________________________________________________________________________
|x1= <sqf>["hello"] remoteExec ["hint"]; // runs unscheduled
["hello"] remoteExecCall ["hint"]; // no difference at all</sqf>


| [[remoteExecCall]] [[BIS_fnc_MP]] |= See also
|x2= <sqf>["my message"] remoteExec ["BIS_fnc_infoText"]; // correct
["my message"] remoteExecCall ["BIS_fnc_infoText"]; // wrong - BIS_fnc_infoText needs a scheduled environment, see its spawn need</sqf>


|x3= <sqf>remoteExecCall ["fnc1"];
call fnc2; // fnc1 may or may not be executed after fnc2
call fnc1;
call fnc2; // fnc2 will be executed after fnc1</sqf>
|seealso= [[remoteExec]] [[remoteExecutedOwner]] [[isRemoteExecuted]] [[isRemoteExecutedJIP]] [[Arma 3: Remote Execution]] [[canSuspend]] [[BIS_fnc_MP]]
}}
}}


<!-- CONTINUE Notes -->


<!-- DISCONTINUE Notes -->
{{GameCategory|arma3|Remote Execution}}

Latest revision as of 18:43, 4 January 2023

Hover & click on the images for description

Description

Description:
Unscheduled version of remoteExec. The only difference between remoteExec and remoteExecCall is that remoteExecCall will run functions in unscheduled environment.
The "Call" in remoteExecCall only means that the remote execution will take place in unscheduled environment and does not mean it will happen right away (see Example 3).
Groups:
Multiplayer

Syntax

Syntax:
see remoteExec
Parameters:
see remoteExec
Return Value:
see remoteExec

Examples

Example 1:
["hello"] remoteExec ["hint"]; // runs unscheduled ["hello"] remoteExecCall ["hint"]; // no difference at all
Example 2:
["my message"] remoteExec ["BIS_fnc_infoText"]; // correct ["my message"] remoteExecCall ["BIS_fnc_infoText"]; // wrong - BIS_fnc_infoText needs a scheduled environment, see its spawn need
Example 3:
remoteExecCall ["fnc1"]; call fnc2; // fnc1 may or may not be executed after fnc2 call fnc1; call fnc2; // fnc2 will be executed after fnc1

Additional Information

See also:
remoteExec remoteExecutedOwner isRemoteExecuted isRemoteExecutedJIP Arma 3: Remote Execution canSuspend BIS_fnc_MP

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note