Action for a GUI window event such as OnClick. The function that will be called will get the "value" parameter as the first parameter. Additional parameters are: player, gui_id, subwindow_id, target.
See the
GUI documentation for further explanations.
func Initialize()
{
var menu =
{
BackgroundColor = RGB(255, 0, 0),
OnClick = GuiAction_Call(this, "DoTheScream", nil)
};
var menuID = GuiOpen(menu);
}
func DoTheScream(data, int player, int gui_id, int subwindow_id, object target)
{
Sound("Scream");
}
Defines a new GUI window that screams when you click it. This could be a scenario script.