func send_notification

Description

Displays a notification to the player in the notification box. All notifications (or messages) use BBCode. See BBCode on the Godot documentation for more information on this topic.


Arguments

  1. String notification OR Array notifications
    • The message you want to send to the player.
  2. Float chance (default = 1)
    • The chance (between values 0.0 and 1.0) that the message will be sent.

Usage

if health <= 0:
		send_notification("You are [b]dead![/b]") # 100% chance this will be sent
else:
		send_notification("You are alive!", 0.5) # 50% chance this will be sent