Hi everyone!
I'm trying to use the alert messages to show some special messages, like a key item or ability acquired.
How can I trigger some events, so I could change/block the player input (I'm using the new input system) while the alert is shown? I could accomplished that during conversations using the Dialogue System Events but I could't find some kind of similar option for alerts.
I found this old topic https://www.pixelcrushers.com/phpbb/vie ... art#p13771 but the receiver wont get the message. I even tried to use the Message Events but without success.
OnAlertStart & OnAlertEnd
Re: OnAlertStart & OnAlertEnd
Hi,
The Dialogue System sends the OnShowAlert message to the Dialogue Manager and its children (see here) but if you need to disable player input while an alert is showing, I recommend using the Alert Panel's UIPanel component > OnOpen() and OnClose() UnityEvents. Since your dialogue UI is probably a child of the Dialogue Manager, it will be a singleton that survives scene changes. So you'll want to use a script method that finds the player in the current scene. (It's a similar concern to How To: Manage Player Controls and Scene Changes.)
The Dialogue System sends the OnShowAlert message to the Dialogue Manager and its children (see here) but if you need to disable player input while an alert is showing, I recommend using the Alert Panel's UIPanel component > OnOpen() and OnClose() UnityEvents. Since your dialogue UI is probably a child of the Dialogue Manager, it will be a singleton that survives scene changes. So you'll want to use a script method that finds the player in the current scene. (It's a similar concern to How To: Manage Player Controls and Scene Changes.)
Re: OnAlertStart & OnAlertEnd
Hey Tony,
Those those UnityEvents just solved my problem! Thanks for your help!
Those those UnityEvents just solved my problem! Thanks for your help!
Re: OnAlertStart & OnAlertEnd
Glad to help!