# AIWaveGetTimeSinceRetreat

FlagsNative

# Arguments

  • wave — w

Returns — int

native int AIWaveGetTimeSinceRetreat(wave w);

Category: Unclassified

# Examples

mods/core.sc2modbase.sc2data/TriggerLibs/MeleeWaveAI.galaxy:760

        count = AIWaveUnitCount(w) + AIWaveUnitCount(AIWaveGet(player, c_waveMain));

        if ((AIWaveGetTimeSinceRetreat(w) > 120) && (AIGetUserInt(player, c_delayNextAttack) < AIGetTime())) {            
            // if we're allowed to attack && we've waited at least 120 seonds after retreating, consider attacking

mods/warcoop/warmeleeai.sc2modbase.sc2data/TriggerLibs/MeleeWaveAI.galaxy:853

        count = AIWaveUnitCount(w) + AIWaveUnitCount(AIWaveGet(player, c_waveMain));

        if ((AIWaveGetTimeSinceRetreat(w) > 2) && (AIGetUserInt(player, c_delayNextAttack) < AIGetTime())) {            
            // if we're allowed to attack && we've waited at least 30 seonds after retreating, consider attacking