Zum Inhalt springen
Gothic Multiplayer
Gothic MP Wiki

Notifications

The game's own HUD notifications with the text of a script.

since 0.1.0-alpha

The server can show them too: showNotification(pid, ...).

Notifications

showNotification

since 0.1.31-alpha
showNotification(text, seconds?, icon?, action?)

Shows the game's own HUD notification (the one used for e.g. "Strength +5") with the given text, only for this player. Notifications queue up like the game's own. Optionally with the icon of an item and the key of a game action next to the text (the key the player has bound to that action, keyboard or gamepad). To show one to a player from the server use the server's showNotification(pid, text, seconds, icon, action).

showNotification("Lorem ipsum dolor sit amet")
showNotification("Consectetur adipiscing elit", 8, "ItMi_Orenugget")
showNotification("Sed do eiusmod tempor", nil, "ItMw_1H_Axe_01", "OpenInventory")
ParameterTypeDescription
textstringText (UTF-8).
seconds (optional)numberHow long the notification stays, in seconds. Default: the game's own time.
icon (optional)ItemClassItem whose icon is shown. Default: no icon.
action (optional)InputActionGame action whose key is shown. Default: no key.

Returns: boolean - false when there is no HUD yet (e.g. during loading).