# Old Unit Owner

Grammar — Old unit owner
FlagsNative | Function

Returns the previous owner of a unit, when used in response to “Unit Owner Changes”.

Returns — int

native int EventUnitOwnerOld();

# Supported triggers

Category: Unit / Basic

# Examples

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMU.galaxy:10497

    }

    if ((PlayerGroupHasPlayer(libCOOC_gf_HumanPlayers(), EventUnitOwnerOld()) == false) && (PlayerGroupHasPlayer(libCOOC_gf_HumanPlayers(), EventUnitOwnerNew()) == true)) {
        libCOMU_gf_CT_RemoveAvenger(EventUnit());
        libCOMU_gf_CT_RemoveUnitSpeed(EventUnit());

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMU.galaxy:10503

    }

    if ((PlayerGroupHasPlayer(libCOOC_gf_HumanPlayers(), EventUnitOwnerOld()) == true) && (PlayerGroupHasPlayer(libCOOC_gf_HumanPlayers(), EventUnitOwnerNew()) == false)) {
        libCOMU_gf_CT_RemoveStructureStealBehavior(EventUnit());
    }

mods/warcoop/warclassicsystem.sc2modbase.sc2data/TriggerLibs/WarClassicSystem.galaxy:766

    // Variable Initialization
    lv_playerNew = EventUnitOwnerNew();
    lv_playerOld = EventUnitOwnerOld();

    // Actions