Smarter Alert and AlertQueue

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
EatAllTheGames
Posts: 23
Joined: Mon Jul 30, 2018 9:20 am

Smarter Alert and AlertQueue

Post by EatAllTheGames »

Hi,

Proud new customer of this asset - great so far.

I'm using the Alert window for various things, one of which is for my item shop notifications, e.g. "You have insufficient funds", "Already equipped", or "Item purchased".

I really like the AlertQueue, it works great for the gameplay notifications like "Boss Spawning", "You levelled up", etc, but it doesn't work as well with the menu systems. E.g., if I spam purchase X times on an item I can't afford, I will be shown X alerts one after another in the queue... after minutes after I've moved on.

For now I've got a quick hack in there (which was probably overwritten by a patch I just imported), which loops through the queue, checks if the message string is already in there, and then doesn't fire a new alert.

I'm wondering if there is perhaps a way the alert system could be improved, perhaps by calling Alert (I call it via c#) with a bool indicating if it needs to be queued or shown instantly, and if it's shown instantly, it pauses the queue and takes priority.

Does anything exist which can do this at the moment?

Thank you
User avatar
Tony Li
Posts: 22057
Joined: Thu Jul 18, 2013 1:27 pm

Re: Smarter Alert and AlertQueue

Post by Tony Li »

Hi,

You could make a subclass of StandardDialogueUI and override the ShowAlert method. I'll put together a small example in a bit and post it here.

p.s. - Did the patch fix the UI focus issue for you?
User avatar
Tony Li
Posts: 22057
Joined: Thu Jul 18, 2013 1:27 pm

Re: Smarter Alert and AlertQueue

Post by Tony Li »

I went ahead and added it directly to the Standard Dialogue UI. The Alert section has two new checkboxes:
  • Don't Queue Duplicates
  • Allow Force Immediate
This package contains the updated Standard Dialogue UI script and an example scene:

AlertExample_2018-07-30.unitypackage

The updated Standard Dialogue UI script will also be in the next full release.
EatAllTheGames
Posts: 23
Joined: Mon Jul 30, 2018 9:20 am

Re: Smarter Alert and AlertQueue

Post by EatAllTheGames »

Tony Li wrote: Mon Jul 30, 2018 12:01 pm I went ahead and added it directly to the Standard Dialogue UI. The Alert section has two new checkboxes:
  • Don't Queue Duplicates
  • Allow Force Immediate
This package contains the updated Standard Dialogue UI script and an example scene:

AlertExample_2018-07-30.unitypackage

The updated Standard Dialogue UI script will also be in the next full release.
Wow! Very quick support and more than just guidance... excellent value for money already. Thank you, I will check these out soon. Regarding the focus issue - it's 99%, I'll look into it further to find out if it's an issue with my own code or not and report back. Thanks again.
Post Reply