I'm trying to delay the Event message popup for when the HHH boss spawns. I need to block the original message and make a new one around 3 seconds later. The below code loops into itself by blocking the event and then creates a new event that loops back into being blocked. How could I write this to achieve what I want?
Code:
HookEvent("pumpkin_lord_summoned", Event_HHH_Spawned, EventHookMode_Pre);
public Action Event_HHH_Spawned(Event event, const char[] name, bool dontBroadcast)
{
CreateTimer(3.0, Timer_HHH_Delay_Message);
return Plugin_Handled;
}
public Action Timer_HHH_Delay_Message(Handle timer) {
Handle event = CreateEvent("pumpkin_lord_summoned");
FireEvent(event);
}