GetCursor
Category: Objects
/ Crew
Since engine version: 4.6.5.0 CP
(extended in 4.9.1.0 GWE)
Description
Returns the currently controlled clonk of a player. If multiple clonks are selected, index 0 will always return the primarily controlled clonk which is also followed by the player view.
Syntax
object GetCursor
(int iPlayer, int iIndex);
Parameters
- iPlayer:
Player number of the player whose controlled clonk you want to determine.
- iIndex:
[opt]
Index which can be used to change crew selection. 0 is always the currently controlled clonk.
Examples
if (!GetCursor(0)) SetCursor(GetHiRank(0));
Selects the player's highest ranking clonk if currently no other clonk is selected.
var pCrew,i; while (pCrew=GetCursor(0,i++)) Message("Hurra!", i);
Displays a message above all currently selected clonks of the first player.
Sven2, Februar 2003