publicVariableClient: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "{{Command " to "{{RV|type=command ") |
Lou Montana (talk | contribs) m (Text replacement - "<dd class="notedate">Posted on ([^<>]+) " to "<dd class="notedate">Posted on $1</dd> ") |
||
Line 31: | Line 31: | ||
<!-- Note Section BEGIN --> | <!-- Note Section BEGIN --> | ||
<dd class="notedate">Posted on 24 Aug, 2012 | <dd class="notedate">Posted on 24 Aug, 2012</dd> | ||
<dt class="note">[[User:Kylania|Kylania]]<dd class="note"> | <dt class="note">[[User:Kylania|Kylania]]<dd class="note"> | ||
publicVariableServer (run on client)<BR> | publicVariableServer (run on client)<BR> | ||
Line 40: | Line 40: | ||
This is a useful way to cut down on network traffic, as publicVariable commands are issued as a priority message. So use publicVariable sparingly, and these commands where they apply. - [http://forums.bistudio.com/showthread.php?136494-ARMA-2-OA-beta-build-94209-(1-60-MP-compatible-build-post-1-60-release)&p=2179795&viewfull=1#post2179795 Rocket] | This is a useful way to cut down on network traffic, as publicVariable commands are issued as a priority message. So use publicVariable sparingly, and these commands where they apply. - [http://forums.bistudio.com/showthread.php?136494-ARMA-2-OA-beta-build-94209-(1-60-MP-compatible-build-post-1-60-release)&p=2179795&viewfull=1#post2179795 Rocket] | ||
<dd class="notedate">Posted on 21 Sep, 2013 | <dd class="notedate">Posted on 21 Sep, 2013</dd> | ||
<dt class="note">[[User:Killzone_Kid|Killzone_Kid]]<dd class="note"> | <dt class="note">[[User:Killzone_Kid|Killzone_Kid]]<dd class="note"> | ||
While [[publicVariable]] is JIP compatible and persistent, [[publicVariableClient]] is not. If you log out then log in with the same owner id the public variable sent to your client prior will be [[nil]]. | While [[publicVariable]] is JIP compatible and persistent, [[publicVariableClient]] is not. If you log out then log in with the same owner id the public variable sent to your client prior will be [[nil]]. |
Revision as of 01:06, 30 January 2021
Description
- Description:
- Description needed
- Groups:
- MultiplayerVariables
Syntax
- Syntax:
- Syntax needed
- Parameters:
- clientID: Number
- varName: String
- Return Value:
- Return value needed
Examples
- Example 1:
3 publicVariableClient "CTFscoreOne";
Additional Information
- See also:
- See also needed
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
- Posted on 24 Aug, 2012
- Kylania
-
publicVariableServer (run on client)
publicVariableClient (run on server)
Publishes a variable (name as STRING) to a specific client, from the server. This is useful where you want to synchronize a variable with only a specific client.
This is a useful way to cut down on network traffic, as publicVariable commands are issued as a priority message. So use publicVariable sparingly, and these commands where they apply. - Rocket - Posted on 21 Sep, 2013
- Killzone_Kid
-
While publicVariable is JIP compatible and persistent, publicVariableClient is not. If you log out then log in with the same owner id the public variable sent to your client prior will be nil.
//server pv = 123; 3 publicVariableClient "pv"; //connected client with id 3 hint str pv; //123 // //client log out/log in // //client id is still 3 hint str pv; //error, undefined variable pv
- Posted on April 12, 2015 - 09:27 (UTC)
- Killzone Kid
- Tested in Arma 3 v1.43, publicVariableClient works client-to-client if owner id of the targeted client is known.