# Alert

Grammar — Player player received alert alertType.
FlagsNative | Event

Event that occurs when a player receives an alert.

# Arguments

  • int — Player
  • string<gamelink::Alert> — Alert Type

Returns — void

native void TriggerAddEventAlert(
	trigger t,
	int player,
	string modelLink,
);

Category: UI / Alerts

# Examples

campaigns/void.sc2campaignbase.sc2maps/maps/campaign/sc2tutorial.sc2map/MapScript.galaxy:3317

    TriggerEnable(gt_SupplyHelperActivator, false);
    TriggerAddEventCommandError(gt_SupplyHelperActivator, gv_p01_USER, c_cmdNotEnoughFood, null);
    TriggerAddEventAlert(gt_SupplyHelperActivator, gv_p01_USER, "TrainError");
}

campaigns/void.sc2campaign/base.sc2maps/maps/campaign/sc2tutorial.sc2mapMapScript.galaxy:3317

    TriggerEnable(gt_SupplyHelperActivator, false);
    TriggerAddEventCommandError(gt_SupplyHelperActivator, gv_p01_USER, c_cmdNotEnoughFood, null);
    TriggerAddEventAlert(gt_SupplyHelperActivator, gv_p01_USER, "TrainError");
}