# Wave Time Since Ordered
Grammar — How long since the specified wave waveRef has been ordered
Flags —Native
|Function
Returns how long since the specified wave has been ordered.
# Arguments
wave
— Wave
Returns — int
native int AIWaveGetTimeSinceOrdered(wave w);
# Related
Category: AI Advanced / Waves / Functions
- Create Wave Info —
waveinfo
— AIWaveInfoCreate - Create Wave Info From Wave —
waveinfo
— AIWaveInfo - Create Wave —
wave
— AIWaveCreate - Wave Unit Count —
int
— AIWaveUnitCount - Wave State —
int
— AIWaveState - Wave Target Unit —
wavetarget
— AIWaveTargetUnit - Wave Target UnitGroup —
wavetarget
— AIWaveTargetUnitGroup - Wave Target Unit Point —
wavetarget
— AIWaveTargetUnitPoint - Wave Target Point —
wavetarget
— AIWaveTargetPoint - Wave Target Player —
wavetarget
— AIWaveTargetPlayer - Wave Target Melee —
wavetarget
— AIWaveTargetMelee - Wave Target Melee Harass —
wavetarget
— AIWaveTargetMeleeHarass - Wave Target Merge —
wavetarget
— AIWaveTargetMerge - Wave Target Patrol —
wavetarget
— AIWaveTargetPatrol - Wave Target Escort —
wavetarget
— AIWaveTargetEscort - Wave Target Escort No Leash —
wavetarget
— AIWaveTargetEscortNL - Wave Target Gather Offense —
wavetarget
— AIWaveTargetGatherO - Wave Target Gather Defense —
wavetarget
— AIWaveTargetGatherD - Wave Target Harass Retreat —
wavetarget
— AIWaveHarassRetreat - Wave Target Region —
wavetarget
— AIWaveTargetRegion - Wave Get Target —
wavetarget
— AIWaveGetTarget - Is Wave In Combat —
bool
— AIWaveIsInCombat - Wave Time In Combat —
int
— AIWaveGetTimeInCombat - Wave Time Since Combat —
int
— AIWaveGetTimeSinceCombat - Wave Time Since Ordered —
int
— AIWaveGetTimeSinceOrdered - Wave Eval —
int
— AIWaveEval - Wave Eval Ratio —
int
— AIWaveEvalRatio - Eval Ratio —
int
— AIEvalRatio - Wave Get —
wave
— AIWaveGet - Wave Type —
int
— AIWaveType - Get Best Attack Target Point —
point
— AIGetBestTarget - Wave To String —
string
— AIWaveToString - Wave To Text —
text
— AIWaveToText
# Examples
mods/core.sc2mod — base.sc2data/TriggerLibs/MeleeWaveAI.galaxy:90
else if (AIWaveState(w) != c_waveStateDefend) {
if (eval > neededEval+10) {
if (AIWaveGetTimeSinceOrdered(w) >= 20) {
DebugAIPlayerWave(player, "self defend2 set wave = defend vs. threats");
AIWaveSetType(w, c_waveStateDefend, AIWaveTargetMeleeDefend(player));
mods/core.sc2mod — base.sc2data/TriggerLibs/MeleeWaveAI.galaxy:113
else if (AIWaveState(w) != c_waveStateDefend) {
if (eval > neededEval+10) {
if (AIWaveGetTimeSinceOrdered(w) >= 5) {
DebugAIPlayerWave(player, "ally defend2 set wave = defend vs. threats");
AIWaveSetType(w, c_waveStateDefend, AIWaveTargetMeleeDefend(player));
mods/core.sc2mod — base.sc2data/TriggerLibs/MeleeWaveAI.galaxy:142
else {
// if we've been idle for 30 seconds, just merge back into the attack wave
if (AIWaveGetTimeSinceOrdered(w) >= 30) {
DebugAIPlayerWave(player, "defend4 merge defend back into attack");
AIWaveMerge(player, c_waveDefend, c_waveAttack);
mods/core.sc2mod — base.sc2data/TriggerLibs/MeleeWaveAI.galaxy:256
}
else if (state != c_waveStateAttack) {
if (AIWaveGetTimeSinceOrdered(w) >= RandomInt(8, 12)) {
DebugAIPlayerWave(player, "set divert = attack harass target");
AIWaveSetType(w, c_waveStateAttack, AIWaveTargetMeleeHarass(player));
mods/warcoop/warmeleeai.sc2mod — base.sc2data/TriggerLibs/MeleeWaveAI.galaxy:220
else if (AIWaveState(w) != c_waveStateDefend) {
if (eval > neededEval+10) {
if (AIWaveGetTimeSinceOrdered(w) >= 20) {
DebugAIPlayerWave(player, "defend2 set wave = defend vs. threats");
AIWaveSetType(w, c_waveStateDefend, AIWaveTargetMeleeDefend(player));
mods/warcoop/warmeleeai.sc2mod — base.sc2data/TriggerLibs/MeleeWaveAI.galaxy:345
}
else if (state != c_waveStateAttack) {
if (AIWaveGetTimeSinceOrdered(w) >= RandomInt(8, 12)) {
DebugAIPlayerWave(player, "set divert = attack harass target");
AIWaveSetType(w, c_waveStateAttack, AIWaveTargetMeleeHarass(player));