📫ODK Notifications

The ODK notification system allows for developers to display notifications on a players HUD.
The Notification Singleton
By default, the BPM_NotificationsSingletonODK
singleton is set in the World Settings. This can be extended and replaced to allow for custom functionality.
The singleton serves as a notifications manager, broadcasting notifications upon receiving a request.
Setting up the HUD widget
In order to display notifications on-screen, you must implement a notifications widget on your WBP_HUD. An example of this is the WBP_NotificationsDisplayODK
widget which contains a vertical box for containing the notification widgets and the functionality to bind to the singleton broadcasts and then add the notifications to the container.
The example widget allows for custom notifcation widgets, but assumes that these widgets extend from WBP_ODKNotificationsBase
.
Custom Widgets
WBP_ODKNotificationsBase
is intended to be used alongside WBP_NotificationsDisplayODK
to create custom widgets for notifications. This base class contains functions for setting up the custom widget and helper functions for optionally downloading the notification images.
The SetupNotification
event should be overidden to set textures and text from the notification payload.
Sending Notifications
Notifications can be sent using the helper functions in BPFL_ODKNotifications
.
Send ODK Notification To Local Player

This function sends a notification to the authoritative player with the following payload:
Notification Type
This allows for grouping of notifications. For example: If you have multiple notifications of the same type, such as collecting an item, any new notifications will replace the existing notification in the list to avoid notification spamming.
Notification Time
How long to display the notification on-screen if it is not dismissed by the user.
ODK Notification Struct
Contains information relevant to the notification such as a Title, Content text, image etc.
The struct also contains an Additional Data
Morpheus packed struct object which allows for including any information not covered by the struct. It is then up to the developer to unpack this object and use the data as they wish.


Send ODK Notifcation To All Players

This node takes in the same parameters as the local notification, but will be displayed on all users screens.
Last updated