Where ever you currently tell the game to create the pop up dont, instead stick it into a ds_queue.
Then have a Gui object that if the queue isnt empty displays the current ds_queue_head value for x number of frames before running ds_queue_dequeue.
This should mean it will now show the next value if there is one.
Here's a pretty rough over view of how I would do it. I've not tested this so it might need some tweaking...
Somewhere you want to create the queue (a control object of some sort would make sense) but you only want to do this once. Also don't forget to destroy the queue when you're finished with it! Like when the level is over or what ever.
Code:
//create the queue and store its id in a global variable for ease
global.notificationQueue = ds_queue_create();
Then where ever you're currently creating your notification pop up instead do something like.
Code:
//add your notification to the queue
ds_queue_enqueue(global.notificationQueue, "your notification here");
Then create an object to display the notification
create event
Code:
showingNotification = false;
//This is a boolean instance variable we'll use in the draw event to know if we should show a notification or not
alarm[0] = 5;
//this is the timer for the alarm that will decide if we should show a notification or not
Alarm[0]
Code:
if(showingNotification){ //are we currently showing a notification?
ds_queue_dequeue(global.notificationQueue); //if yes then dequeue that notification
showingNotification = false; //and set this variable to false as we are no longer showing that notification
}else{ //if we're not showing a notification
if(!ds_queue_empty(global.notificationQueue)){ //then lets check if there is one in the queue to show
showingNotification = true; //if there is one then lets show it
}
}
//now lets reset the timer for the notification
if(showingNotification == false){
alarm[0] = 5; //how long to wait between subsequent notifications and how frequently to check for notifications (so that there is a small pause between them to make it more noticeable to player)
}else{
alarm = 30; //how long to show notification for in frames
}
draw_event
Code:
if(showNotification == true){ //if we should show a notification then do the drawing, if not then dont
//draw any backgrounds for the pop ups or what ever here
draw_text(x, y, ds_queue_head(global.notificationQueue)); //Now draw the value of the current head of the queue
}