selectNoPlayer: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\[\[([a-zA-Z][a-zA-Z0-9_]+)\]\]([^ ]*)<\/code>" to "$1$2</code>")
m (Replaced <code> with <sqf>)
 
(7 intermediate revisions by one other user not shown)
Line 24: Line 24:


|x1= Single player:
|x1= Single player:
<code>[[selectNoPlayer]];
<sqf>selectNoPlayer;
hint str [[player]]; // <NULL-object></code>
hint str player; // <NULL-object></sqf>
Rough multiplayer emulation:
Rough multiplayer emulation:
<code>_noPlayer = [[createGroup]] [[sideLogic]] [[createUnit]] [
<sqf>_noPlayer = createGroup sideLogic createUnit [
"Logic",
"Logic",
[0,0,1000],
[0,0,1000],
Line 34: Line 34:
"NONE"
"NONE"
];
];
[[selectPlayer]] _noPlayer;
selectPlayer _noPlayer;
hint str [[player]]; // L Charlie 4-3:1 (KK)</code>
hint str player; // L Charlie 4-3:1 (KK)</sqf>


|seealso= [[selectPlayer]]
|seealso= [[selectPlayer]]

Latest revision as of 16:41, 14 May 2022

Hover & click on the images for description

Description

Description:
Switches player to no unit, makes player return objNull.
Multiplayer:
Does not work in multiplayer.
Groups:
Object Manipulation

Syntax

Syntax:
selectNoPlayer
Return Value:
Nothing

Examples

Example 1:
Single player:
selectNoPlayer; hint str player; // <NULL-object>
Rough multiplayer emulation:
_noPlayer = createGroup sideLogic createUnit [ "Logic", [0,0,1000], [], 0, "NONE" ]; selectPlayer _noPlayer; hint str player; // L Charlie 4-3:1 (KK)

Additional Information

See also:
selectPlayer

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 09:48, 15 October 2010 (CEST)
Worldeater
player returns objNull after this command has been used. It also has at least the following side effects: closeDialog won't work anymore and onKeyDown event handlers cease to detect the ESC key. In order to get things back to normal a new player object has to be set with selectPlayer. Using objNull won't cut it in this case.