# Wait For Trigger

Grammar — Wait for t to execute, and waitUntilDone|Wait/Don’t Wait until it completes
FlagsNative | Action

Waits until the specified trigger begins executing, and optionally waits until it has completed as well.

# Arguments

Returns — void

native void TriggerWaitForTrigger(
	trigger t,
	bool waitUntilDone,
);

Category: Trigger / Basic

# Examples

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:37540

    libNtve_gf_PlayMovieTextureOnUnitActor(gv_marSaraTV, "video_newsreport_traynor01_00");
    libNtve_gf_SendActorMessageToUnit(gv_marSaraTV, MakeMsgTextureVideoPlay("video", c_textureSlotComponentDefault, 30, c_textureVideoPlayFlagSynced, 1, "Transmission"));
    TriggerWaitForTrigger(gt_TVNewsEventEnd, false);
    return true;
}

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:37663

    libNtve_gf_PlayMovieTextureOnUnitActor(gv_marSaraTV, "video_newsreport_traynor02_00");
    libNtve_gf_SendActorMessageToUnit(gv_marSaraTV, MakeMsgTextureVideoPlay("video", c_textureSlotComponentDefault, 30, c_textureVideoPlayFlagSynced, 1, "Transmission"));
    TriggerWaitForTrigger(gt_TVNewsEventEnd, false);
    return true;
}

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:37797

    }
    libNtve_gf_SendActorMessageToUnit(gv_cantinaTV, MakeMsgTextureVideoPlay("video", c_textureSlotComponentDefault, 30, c_textureVideoPlayFlagSynced, 1, "Transmission"));
    TriggerWaitForTrigger(gt_TVNewsEventEnd, false);
    return true;
}

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:37930

    libNtve_gf_PlayMovieTextureOnUnitActor(gv_cantinaTV, "video_newsreport_thanson02_00");
    libNtve_gf_SendActorMessageToUnit(gv_cantinaTV, MakeMsgTextureVideoPlay("video", c_textureSlotComponentDefault, 30, c_textureVideoPlayFlagSynced, 1, "Transmission"));
    TriggerWaitForTrigger(gt_TVNewsEventEnd, false);
    return true;
}

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:38030

    }
    libNtve_gf_SendActorMessageToUnit(gv_cantinaTV, MakeMsgTextureVideoPlay("video", c_textureSlotComponentDefault, 30, c_textureVideoPlayFlagSynced, 1, "Transmission"));
    TriggerWaitForTrigger(gt_TVNewsEventEnd, false);
    return true;
}

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:38155

    }
    libNtve_gf_SendActorMessageToUnit(gv_cantinaTV, MakeMsgTextureVideoPlay("video", c_textureSlotComponentDefault, 30, c_textureVideoPlayFlagSynced, 1, "Transmission"));
    TriggerWaitForTrigger(gt_TVNewsEventEnd, false);
    return true;
}

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:38247

    libNtve_gf_PlayMovieTextureOnUnitActor(gv_cantinaTV, "video_newsreport_ttosh01_00");
    libNtve_gf_SendActorMessageToUnit(gv_cantinaTV, MakeMsgTextureVideoPlay("video", c_textureSlotComponentDefault, 30, c_textureVideoPlayFlagSynced, 1, "Transmission"));
    TriggerWaitForTrigger(gt_TVNewsEventEnd, false);
    return true;
}

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:38314

    Wait(8.0, c_timeGame);
    CameraApplyInfo(1, CameraInfoFromId(197), 0.0, -1, 10, true);
    TriggerWaitForTrigger(gt_TVNewsEventEnd, false);
    return true;
}

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:38408

    libNtve_gf_PlayMovieTextureOnUnitActor(gv_cantinaTV, "video_newsreport_ttosh03a_00");
    libNtve_gf_SendActorMessageToUnit(gv_cantinaTV, MakeMsgTextureVideoPlay("video", c_textureSlotComponentDefault, 30, c_textureVideoPlayFlagSynced, 1, "Transmission"));
    TriggerWaitForTrigger(gt_TVNewsEventEnd, false);
    return true;
}

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:38503

    libNtve_gf_PlayMovieTextureOnUnitActor(gv_cantinaTV, "video_newsreport_ttosh03b_00");
    libNtve_gf_SendActorMessageToUnit(gv_cantinaTV, MakeMsgTextureVideoPlay("video", c_textureSlotComponentDefault, 30, c_textureVideoPlayFlagSynced, 1, "Transmission"));
    TriggerWaitForTrigger(gt_TVNewsEventEnd, false);
    return true;
}

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2mapMapScript.galaxy:37540

    libNtve_gf_PlayMovieTextureOnUnitActor(gv_marSaraTV, "video_newsreport_traynor01_00");
    libNtve_gf_SendActorMessageToUnit(gv_marSaraTV, MakeMsgTextureVideoPlay("video", c_textureSlotComponentDefault, 30, c_textureVideoPlayFlagSynced, 1, "Transmission"));
    TriggerWaitForTrigger(gt_TVNewsEventEnd, false);
    return true;
}

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2mapMapScript.galaxy:37663

    libNtve_gf_PlayMovieTextureOnUnitActor(gv_marSaraTV, "video_newsreport_traynor02_00");
    libNtve_gf_SendActorMessageToUnit(gv_marSaraTV, MakeMsgTextureVideoPlay("video", c_textureSlotComponentDefault, 30, c_textureVideoPlayFlagSynced, 1, "Transmission"));
    TriggerWaitForTrigger(gt_TVNewsEventEnd, false);
    return true;
}

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2mapMapScript.galaxy:37797

    }
    libNtve_gf_SendActorMessageToUnit(gv_cantinaTV, MakeMsgTextureVideoPlay("video", c_textureSlotComponentDefault, 30, c_textureVideoPlayFlagSynced, 1, "Transmission"));
    TriggerWaitForTrigger(gt_TVNewsEventEnd, false);
    return true;
}

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2mapMapScript.galaxy:37930

    libNtve_gf_PlayMovieTextureOnUnitActor(gv_cantinaTV, "video_newsreport_thanson02_00");
    libNtve_gf_SendActorMessageToUnit(gv_cantinaTV, MakeMsgTextureVideoPlay("video", c_textureSlotComponentDefault, 30, c_textureVideoPlayFlagSynced, 1, "Transmission"));
    TriggerWaitForTrigger(gt_TVNewsEventEnd, false);
    return true;
}

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2mapMapScript.galaxy:38030

    }
    libNtve_gf_SendActorMessageToUnit(gv_cantinaTV, MakeMsgTextureVideoPlay("video", c_textureSlotComponentDefault, 30, c_textureVideoPlayFlagSynced, 1, "Transmission"));
    TriggerWaitForTrigger(gt_TVNewsEventEnd, false);
    return true;
}

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2mapMapScript.galaxy:38155

    }
    libNtve_gf_SendActorMessageToUnit(gv_cantinaTV, MakeMsgTextureVideoPlay("video", c_textureSlotComponentDefault, 30, c_textureVideoPlayFlagSynced, 1, "Transmission"));
    TriggerWaitForTrigger(gt_TVNewsEventEnd, false);
    return true;
}

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2mapMapScript.galaxy:38247

    libNtve_gf_PlayMovieTextureOnUnitActor(gv_cantinaTV, "video_newsreport_ttosh01_00");
    libNtve_gf_SendActorMessageToUnit(gv_cantinaTV, MakeMsgTextureVideoPlay("video", c_textureSlotComponentDefault, 30, c_textureVideoPlayFlagSynced, 1, "Transmission"));
    TriggerWaitForTrigger(gt_TVNewsEventEnd, false);
    return true;
}

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2mapMapScript.galaxy:38314

    Wait(8.0, c_timeGame);
    CameraApplyInfo(1, CameraInfoFromId(197), 0.0, -1, 10, true);
    TriggerWaitForTrigger(gt_TVNewsEventEnd, false);
    return true;
}

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2mapMapScript.galaxy:38408

    libNtve_gf_PlayMovieTextureOnUnitActor(gv_cantinaTV, "video_newsreport_ttosh03a_00");
    libNtve_gf_SendActorMessageToUnit(gv_cantinaTV, MakeMsgTextureVideoPlay("video", c_textureSlotComponentDefault, 30, c_textureVideoPlayFlagSynced, 1, "Transmission"));
    TriggerWaitForTrigger(gt_TVNewsEventEnd, false);
    return true;
}

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2mapMapScript.galaxy:38503

    libNtve_gf_PlayMovieTextureOnUnitActor(gv_cantinaTV, "video_newsreport_ttosh03b_00");
    libNtve_gf_SendActorMessageToUnit(gv_cantinaTV, MakeMsgTextureVideoPlay("video", c_textureSlotComponentDefault, 30, c_textureVideoPlayFlagSynced, 1, "Transmission"));
    TriggerWaitForTrigger(gt_TVNewsEventEnd, false);
    return true;
}

campaigns/swarm.sc2campaignbase.sc2maps/maps/campaign/swarm/zkorhal02.sc2map/MapScript.galaxy:3211

        lv_psifieldtimer = gv_fieldPowerUpTime01;
        gv_psifieldshrinkpersec = 20.0;
        TriggerWaitForTrigger(gt_MidQ, true);
        TriggerExecute(gt_RevealTealUnits, true, false);
        gf_DisplayFieldPowerLeaderboard();

campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zkorhal02.sc2mapMapScript.galaxy:3211

        lv_psifieldtimer = gv_fieldPowerUpTime01;
        gv_psifieldshrinkpersec = 20.0;
        TriggerWaitForTrigger(gt_MidQ, true);
        TriggerExecute(gt_RevealTealUnits, true, false);
        gf_DisplayFieldPowerLeaderboard();

campaigns/swarmstory.sc2campaignbase.sc2data/TriggerLibs/SwarmCampaignLib.galaxy:9338

    }
    DialogControlFadeTransparency(DialogControlLastCreated(), PlayerGroupAll(), 2.0, 0.0);
    TriggerWaitForTrigger(libSwaC_gt_ZS_ArmyCustomEvolutionFanfareOver, true);
    DialogDestroy(lv_splitTitleDialog);
    CutsceneStop(libSwaC_gv_zS_ArmyCustomEvolutionFanfareCutscene);

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/UILib.galaxy:1985

        if ((lv_heroIndex != 0)) {
            DialogControlSelectItem(libUIUI_gv_uIDebugPanel.lv_heroDropdown, PlayerGroupSingle(1), lv_heroIndex);
            TriggerWaitForTrigger(libUIUI_gt_UIDebugPanelHeroDropdownSelectionChange, true);
        }

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/UILib.galaxy:1991

        if ((lv_skinIndex != 0)) {
            DialogControlSelectItem(libUIUI_gv_uIDebugPanel.lv_skinDropdown, PlayerGroupSingle(1), lv_skinIndex);
            TriggerWaitForTrigger(libUIUI_gt_UIDebugPanelSkinDropdownSelectionChange, true);
        }

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/UILib.galaxy:1997

        if ((lv_mountIndex != 0)) {
            DialogControlSelectItem(libUIUI_gv_uIDebugPanel.lv_mountTypeDropdown, PlayerGroupSingle(1), lv_mountIndex);
            TriggerWaitForTrigger(libUIUI_gt_UIDebugPanelMountTypeDropdownSelectionChange, true);
        }