# Run Trigger By Name
Grammar — Run t (check|Check/Ignore Conditions, wait|Wait/Don’t Wait until it finishes)
Flags —Action
Executes the specified trigger. If Trigger A calls “Run Trigger” to execute Trigger B, then Trigger A will not continue execution until either Trigger B returns, reaches the end of its actions, or reaches a “Wait” action. If Trigger B has a “Wait” action, and the Wait parameter of “Run Trigger” was set to Don’t Wait, then Trigger A will resume execution. If the Wait parameter was set to Wait, then Trigger A will not resume execution until Trigger B has completed or returned.
# Arguments
string
— Trigger Namebool
<preset::Trigger_Check_Conditions> — Checkbool
<preset::Trigger_Wait_Option> — Wait
Returns — void
void libNtve_gf_TriggerExecuteByName(
string lp_t,
bool lp_check,
bool lp_wait,
);
# Related
Category: Trigger / Basic
- Create Trigger From Trigger
- New Trigger —
trigger
— TriggerCreate - Run Trigger —
void
— TriggerExecute - Run Trigger By Name —
void
— libNtve_gf_TriggerExecuteByName - Stop Trigger —
void
— TriggerStop - Destroy Trigger —
void
— TriggerDestroy - Turn Trigger On/Off —
void
— TriggerEnable - Trigger Is On —
bool
— TriggerIsEnabled - Current Trigger —
trigger
— TriggerGetCurrent - Wait For Trigger —
void
— TriggerWaitForTrigger - Current Trigger Thread SetFlags —
void
— TriggerCurrentTriggerThreadSetFlags - Allow Trigger To Be Skipped —
void
— TriggerSkippableBegin - Player Skips Trigger —
void
— TriggerAddEventTriggerSkipped - Register Events — macro
- Send Generic Event —
void
— TriggerSendEvent - Generic Event —
void
— TriggerAddEventGeneric - Generic Event Parameter —
string
— TriggerEventParamName - Triggering Event Name —
string
— EventGenericName - Triggering Trigger —
trigger
— EventTrigger - Trigger Active Count —
int
— TriggerActiveCount - Trigger Execution Count —
int
— TriggerGetExecCount - Trigger Evaluation Count —
int
— TriggerGetEvalCount - Trigger Function Name —
string
— TriggerGetFunction - Evaluate Trigger Conditions —
bool
— TriggerEvaluate
# Examples
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOOC.galaxy:1018
lv_script = UserDataGetString("PlayerPrestigeUpgradeSupplements", lp_upgradeSupplemental, "PostScript", 1);
if ((lv_script != "")) {
libNtve_gf_TriggerExecuteByName((lv_script + "_Func"), false, true);
}
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOOC.galaxy:1105
lv_script = UserDataGetString("PlayerPrestige", lp_prestige, "ScriptName", 1);
if ((lv_script != "")) {
libNtve_gf_TriggerExecuteByName((lv_script + "_Func"), true, true);
}
mods/warcoop/warcoopdata.sc2mod — base.sc2data/TriggerLibs/WarCoopData.galaxy:380
if ((lv_triggername != "")) {
DataTableSetInt(false, ("Player"), lp_player);
libNtve_gf_TriggerExecuteByName(lv_functionname, false, true);
}