Page 1 of 1

Different alert panels?

Posted: Fri May 14, 2021 2:36 pm
by Strook
Hello! Is it possible to have multiple Alert panels, like its the case for Dialogue panels
?
I would like to be able to have multiple Alert panels skins, and choose one specifically when I call an alert (using the dialogue system trigger > Action > ShowAlert).

Thank you!

Re: Different alert panels?

Posted: Fri May 14, 2021 3:37 pm
by Tony Li
Hi,

You can do it with a little code. Make a subclass of StandardDialogueUI, and override the ShowAlert and HideAlert methods to show and hide the message in a specific panel. You could include the panel number in the alert text, maybe something like:

Code: Select all

DialogueManager.ShowAlert("[panel=2] I'm in panel 2!");
Then in your overridden ShowAlert() method, remove "[panel=2]" from the text and show the resulting text in your alert panel #2.

Re: Different alert panels?

Posted: Fri May 14, 2021 4:02 pm
by Strook
that's awesome, thanks a lot I will try this !!