Show Notification
Show a notification to the player
Description
The notification
action let's you show a notification to the player. Notifications can be useful for letting them know about a certain event, or even achievement unlock.
Action ID: Notification
Reversible: Yes
Requires User Interaction: If no time was provided, the player will need to dismiss the notification but the game will not be interrupted.
Parameters
Name | Type | Description |
notification_id |
| The name of the notification you want to show. These must be declared beforehand using this action configuration functions. |
time |
| Optional. The time in milliseconds after which the notification will be automatically dismissed. |
Configuration
To show a notification, you must first declare it with all of it's characteristics. To do so, the notification action has a configuration function where you can define your id or name for each notification and their respective information.
Properties
Name | Type | Description |
title |
| The title for the notification |
body |
| The body of the notification |
icon |
| A path to an image that will be shown as the icon for the notification |
Examples
Simple Notification
The following script will show a notification that the player will have to manually dismiss.
Timed Notification
The following script will make the notification go away automatically after 5 seconds have elapsed. Remember this action receives the time in milliseconds so we'll use 5000
to dismiss it after the 5 seconds
Last updated