# Player For Order
Grammar — Player for o
Flags —Native
|Function
Returns the player number that the order is issued for.
# Arguments
order
— Order
Returns — int
native int OrderGetPlayer(order inOrder);
# Related
Category: Order / Order Properties
- Player For Order —
int
— OrderGetPlayer - Ability Command For Order —
abilcmd
— OrderGetAbilityCommand - Flag Is Enabled For Order —
bool
— OrderGetFlag - Target Item For Order —
unit
— OrderGetTargetItem - Target Point For Order —
point
— OrderGetTargetPoint - Target Position For Order —
point
— OrderGetTargetPosition - Target Type For Order —
int
<preset::OrderTargetType> — OrderGetTargetType - Target Unit For Order —
unit
— OrderGetTargetUnit - Order Is Valid —
bool
— UnitOrderIsValid - Order Set Flag —
void
— OrderSetFlag
# Examples
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:14236
// Variable Initialization
lv_order = EventUnitOrder();
lv_p = OrderGetPlayer(lv_order);
lv_u = EventUnit();
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:21486
lv_order = EventUnitOrder();
lv_queue = OrderGetFlag(lv_order, c_cmdQueued);
lv_laserDrill = libCOMI_gv_cM_LaserDrillUnit[OrderGetPlayer(lv_order)];
lv_orderAttack = OrderTargetingUnit(AbilityCommand("attack", 0), OrderGetTargetUnit(lv_order));
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMU.galaxy:1152
// Implementation
lv_microPlayer = OrderGetPlayer(lp_order);
if (((libCOMU_gv_cT_MutatorEnabledQuickList[(libCOMU_ge_CT_MutatorQuickList_CT_QuickOrderCosts)] == false) || (PlayerGroupHasPlayer(libCOOC_gf_CommanderPlayers(), lv_microPlayer) == false) || (OrderGetFlag(lp_order, c_cmdUser) == false) || (UnitGroupHasUnit(libCOMU_gv_cT_OrderCostImmuneUnits, lp_orderedUnit) == true))) {
return ;
mods/warcoop/warclassicsystem.sc2mod — base.sc2data/TriggerLibs/WarClassicSystem.galaxy:1516
// Variable Initialization
lv_order = EventUnitOrder();
lv_p = OrderGetPlayer(lv_order);
lv_u = EventUnit();