# Target Item For Order

Grammar — Target item for o
FlagsNative | Function

Returns the target for the order if the target is an item.

# Arguments

  • order — Order

Returns — unit

native unit OrderGetTargetItem(order inOrder);

Category: Order / Order Properties

# Examples

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/GameDataHelperLib.galaxy:3152

        else {
            lv_autoAquired = true;
            if ((UnitOrderCount(lv_rexxar) != 0) && (OrderGetAbilityCommand(UnitOrder(lv_rexxar, 0)) != AbilityCommand("RexxarSpiritSwoop", 0)) && (OrderGetAbilityCommand(UnitOrder(lv_rexxar, 0)) != AbilityCommand("RexxarUnleashTheBoars", 0)) && (UnitGetType(OrderGetTargetItem(UnitOrder(lv_rexxar, 0))) != "RexxarFlare") && (OrderGetTargetPosition(UnitOrder(lv_rexxar, 0)) != Point(0.0, 0.0)) && (DistanceBetweenPoints(UnitGetPosition(lv_misha), UnitGetPosition(lv_rexxar)) <= 3.0) && ((OrderGetAbilityCommand(UnitOrder(lv_rexxar, 0)) != AbilityCommand("attack", 0)) || (UnitIsValid(OrderGetTargetUnit(UnitOrder(lv_rexxar, 0))) == false))) {
                UnitAbilityEnable(lv_misha, "attack", true);
                libGDHL_gf_HeroRexxarOrderMishaMoveNearPoint(lv_rexxar, lv_misha, OrderGetTargetPosition(UnitOrder(lv_rexxar, 0)));