multiple alerts in one frame

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Arcanor
Posts: 81
Joined: Sun Oct 05, 2014 4:20 am

multiple alerts in one frame

Post by Arcanor »

I'm sending several alerts sometimes in a single frame. I'm calling it from C# code, like this:

Code: Select all

PixelCrushers.DialogueSystem.DialogueManager.Instance.ShowAlert(_msg, 1f);
I'd like them to queue, but instead it seems they are simply overwriting each other, and only the last one called is actually being show in the UI.

Is there a way around this, or am I stuck with this behavior when using Alerts?
Arcanoria Games - http://www.arcanoria.com - indie game development blog
twitter: https://twitter.com/WaltCollins3 @WaltCollins3
Game titles: Pesticide Patrol, Arcanoria Chronicles, CyberGhost, Arcanoria
PLAY NOW: http://arcanor.itch.io/
User avatar
Tony Li
Posts: 22134
Joined: Thu Jul 18, 2013 1:27 pm

Re: multiple alerts in one frame

Post by Tony Li »

This is a request that a few people made very recently, so I'll add it to the next version.

Until then, you're stuck unless you override your dialogue UI's ShowAlert() message yourself -- for example, create a subclass of UnityUIDialogueUI and override that method to queue alerts instead of showing them immediately. I'll post an example of that tomorrow.
Arcanor
Posts: 81
Joined: Sun Oct 05, 2014 4:20 am

Re: multiple alerts in one frame

Post by Arcanor »

Thanks Tony, kinda what I figured. No need to do an example if it's just for me. I can override the method without any troubles. But I'll probably just wait for your next version update as it's not urgent for me yet.
Arcanoria Games - http://www.arcanoria.com - indie game development blog
twitter: https://twitter.com/WaltCollins3 @WaltCollins3
Game titles: Pesticide Patrol, Arcanoria Chronicles, CyberGhost, Arcanoria
PLAY NOW: http://arcanor.itch.io/
User avatar
Tony Li
Posts: 22134
Joined: Thu Jul 18, 2013 1:27 pm

Re: multiple alerts in one frame

Post by Tony Li »

Hi Walt - The customer download page now has an updated Unity UI support package. It adds a "Queue Alerts" checkbox in the dialogue UI script's Alert settings.
Arcanor
Posts: 81
Joined: Sun Oct 05, 2014 4:20 am

Re: multiple alerts in one frame

Post by Arcanor »

Thanks Tony, although I actually have decided to go with a chat window for now to hold my alert messages, so I'm not actually using the alert dialogue currently. We'll see how that goes, and maybe I'll go back to the alert dialogue window at some time in the future.
Arcanoria Games - http://www.arcanoria.com - indie game development blog
twitter: https://twitter.com/WaltCollins3 @WaltCollins3
Game titles: Pesticide Patrol, Arcanoria Chronicles, CyberGhost, Arcanoria
PLAY NOW: http://arcanor.itch.io/
User avatar
Tony Li
Posts: 22134
Joined: Thu Jul 18, 2013 1:27 pm

Re: multiple alerts in one frame

Post by Tony Li »

That works, too. A lot of RPGs and MMOs that use the Dialogue System do the same thing. It also lets players scroll back through old alerts.
Post Reply