player

From Bohemia Interactive Community
Revision as of 12:24, 23 January 2021 by Lou Montana (talk | contribs) (Text replacement - "{{Command " to "{{RV|type=command ")
Jump to navigation Jump to search
Hover & click on the images for description

Description

Description:
Description needed
Problems:
In MP the command is not initialised in functions called by initline or init eventhandlers.
Groups:
Object Manipulation

Syntax

Syntax:
Syntax needed
Return Value:
Return value needed

Examples

Example 1:
player addRating 500;

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 20 Jul, 2010
GalZohar
Before you use the player object (usually to avoid JIP issues) all you need is to run:
waitUntil { not isNull player }; Anything else you see in other scripts is equivalent and/or redundant. Of course JIP players may need more than just the player to point at the actual JIP player unit, but that's script/mission-specific.
Posted on 27 Jan, 2008
Dr_Eyeball
isNull player is true for JIP players on their client during initialization.
After initialization, it will be set, making it valid again.

To cater for this, some people use code similar to the following in their spawned scripts: if (!isServer && (player != player)) then { waitUntil { player == player }; waitUntil { time > 10 }; }; // 'player' will now be valid _action = player addAction ["heal", "heal.sqf", [], -1, false, false, ""];
Posted on June 26, 2014 - 18:49 (UTC)
Killzone Kid
player can actually be REMOTE object on player's PC: http://www.youtube.com/watch?v=m6IILtfa3cQ