player: Difference between revisions
Jump to navigation
Jump to search
m (Text replace - "</dt>" to "") |
m (Text replace - "</dd>" to "") |
||
Line 32: | Line 32: | ||
<dl class="command_description"> | <dl class="command_description"> | ||
<!-- Note Section BEGIN --> | <!-- Note Section BEGIN --> | ||
<dd class="notedate">Posted on 20 Jul, 2010 | <dd class="notedate">Posted on 20 Jul, 2010 | ||
<dt class="note">'''[[User:GalZohar|GalZohar]]'''<dd class="note"> | <dt class="note">'''[[User:GalZohar|GalZohar]]'''<dd class="note"> | ||
Before you use the '''player''' object (usually to avoid JIP issues) all you need is to run:<br> | Before you use the '''player''' object (usually to avoid JIP issues) all you need is to run:<br> | ||
waitUntil {!isNull player}; | waitUntil {!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. | 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. | ||
<dd class="notedate">Posted on 27 Jan, 2008 | <dd class="notedate">Posted on 27 Jan, 2008 | ||
<dt class="note">'''[[User:Dr_Eyeball|Dr_Eyeball]]'''<dd class="note"> | <dt class="note">'''[[User:Dr_Eyeball|Dr_Eyeball]]'''<dd class="note"> | ||
([[isNull]] [[player]]) is true for JIP players on their client during initialization.<br> | ([[isNull]] [[player]]) is true for JIP players on their client during initialization.<br> | ||
Line 54: | Line 54: | ||
<br> | <br> | ||
See [[6thSense.eu:EG|JIP/player topic]] for additional helpful information. | See [[6thSense.eu:EG|JIP/player topic]] for additional helpful information. | ||
<!-- Note Section END --> | <!-- Note Section END --> | ||
</dl> | </dl> |
Revision as of 13:37, 21 October 2011
Description
- Description:
- Person controlled by player. In MP this value is different on each computer. In Intros and Outros this isn't set by default and must be assigned.
- Problems:
- In MP the command is not initialised in functions called by initline or init eventhandlers.
- Groups:
- Uncategorised
Syntax
Examples
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
Notes
- Posted on 20 Jul, 2010
- GalZohar
-
Before you use the player object (usually to avoid JIP issues) all you need is to run:
waitUntil {!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, ""];
See JIP/player topic for additional helpful information.