# Player For Order

Grammar — Player for o
FlagsNative | Function

Returns the player number that the order is issued for.

# Arguments

  • order — Order

Returns — int

native int OrderGetPlayer(order inOrder);

Category: Order / Order Properties

# Examples

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMI.galaxy:14236

    // Variable Initialization
    lv_order = EventUnitOrder();
    lv_p = OrderGetPlayer(lv_order);
    lv_u = EventUnit();

mods/starcoop/starcoop.sc2modbase.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.sc2modbase.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.sc2modbase.sc2data/TriggerLibs/WarClassicSystem.galaxy:1516

    // Variable Initialization
    lv_order = EventUnitOrder();
    lv_p = OrderGetPlayer(lv_order);
    lv_u = EventUnit();