# Alert
Grammar — Player player received alert alertType.
Flags —Native
|Event
Event that occurs when a player receives an alert.
# Arguments
int
— Playerstring
<gamelink::Alert> — Alert Type
Returns — void
native void TriggerAddEventAlert(
trigger t,
int player,
string modelLink,
);
# Related
Category: UI / Alerts
- Alert —
void
— TriggerAddEventAlert - Triggering Alert —
string
<gamelink::Alert> — EventAlert - Create Alert At Point —
void
— UIAlertPoint - Create Alert At Unit —
void
— UIAlertUnit - Create Alert With No Source —
void
— UIAlert - Clear Alerts —
void
— UIAlertClear - Show/Hide Alert Type —
void
— UISetAlertTypeVisible
# Examples
campaigns/void.sc2campaign — base.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.sc2map — MapScript.galaxy:3317
TriggerEnable(gt_SupplyHelperActivator, false);
TriggerAddEventCommandError(gt_SupplyHelperActivator, gv_p01_USER, c_cmdNotEnoughFood, null);
TriggerAddEventAlert(gt_SupplyHelperActivator, gv_p01_USER, "TrainError");
}