local

From Bohemia Interactive Community
Revision as of 14:11, 17 September 2014 by Killzone Kid (talk | contribs) (support for Group, example corrected)
Jump to navigation Jump to search
Hover & click on the images for description

Description

Description:
Check if given unit is local on the computer in Multiplayer games (see Locality in Multiplayer for general concepts).
This can be used when some activation fields or scripts need to be performed only on one computer. In Singleplayer all objects are local.
Note: Map created objects (those placed in Visitor) are local everywhere.
Problems:
In MP remote objects are not initialised in functions called by initline or init eventhandlers.
Groups:
Uncategorised

Syntax

Syntax:
local object
Parameters:
object: Object or Group (since Arma 3 v1.31.127204
Return Value:
Boolean

Examples

Example 1:
SQS:?!local _unitName : hint "remote"
Example 2:
SQF:if (!local _unitName) then { hint "remote"; };

Additional Information

See also:
Local Event HandlerownersetOwner

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

Notes

Posted on August 4, 2006 - 10:56
hardrock
Notes from before the conversion: In multiplayer, a game logic will always be local to the host computer. This works on both dedicated and player-hosted servers.

Bottom Section