Space Engineers

Space Engineers

49 ratings
Hud Alert API
   
Award
Favorite
Favorited
Unfavorite
Type: Mod
Mod category: Script
Tags: hud
File Size
Posted
Updated
185.150 KB
7 Sep, 2019 @ 8:58pm
20 Sep, 2019 @ 5:49pm
3 Change Notes ( view )

Subscribe to download
Hud Alert API

Description
This mod allows ingame scripts to show notifications on the player hud with optional support for TextHudAPI.

Properties
These are the properties on the programming block that can be used to show notifications:
Id
Type
Info
SendMessageToSeat
MyTuple<IMyCockpit, string, string, float>
Call SetValue with a MyTuple containing the target cockpit, the text, the font, and the duration.
SendMessageToAllSeats
MyTuple<string, string, float>
Call SetValue with a MyTuple containing the text, the font, and the duration. Will only reach anyone in a seat/cockpit.
SendMessageToAntenna
MyTuple<IMyAntenna, string, string, float>
Call SetValue with a MyTuple containing the target antenna, the text, the font, and the duration. Will not reach anyone in a seat/cockpit.
SendMessageToAll
MyTuple<IMyAntenna, string, string, float>
Call SetValue with a MyTuple containing the target antenna, the text, the font, and the duration.
PanelsReady
bool
Call GetValue with this property to see if the TextHudAPI is loaded.
Properties that require TextHudAPI:
SendPanelToSeat
MyTuple<IMyCockpit, string, string, Vector2D, float, float>
Call SetValue with a MyTuple containing the target cockpit, the text, font, position, scale and the duration.
SendPanelToAllSeats
MyTuple<string, string, Vector2D, float, float>
Call SetValue with a MyTuple containing the text, font, position, scale and the duration. Will only reach anyone in a seat/cockpit.
SendPanelToAntenna
MyTuple<IMyAntenna, string, string, Vector2D, float, float>
Call SetValue with a MyTuple containing the target antenna, the text, font, position, scale and the duration. Will not reach anyone in a seat/cockpit.
SendPanelToAll
MyTuple<IMyAntenna, string, string, Vector2D, float, float>
Call SetValue with a MyTuple containing the target antenna, the text, font, position, scale and the duration.
All durations are in seconds and can be at most 30 seconds.
See an lcd panel for font name options.
Only allied players will receive messages.
TextHudAPI must be loaded for the panels feature to work, but the mod will fall back to vanilla alerts if it is not loaded. Scale and number of panels on the screen are limited by the player in the chat+F2 settings menu.

Example
Me.SetValue<MyTuple<IMyCockpit, string, string, float>>("SendMessageToSeat", new MyTuple<IMyCockpit, string, string, float>(cockpit, "Hello from HudAlertAPI!", "White", 1.5f));

If you have or know of a script on the workshop that utilizes this mod, let me know and I will put the script here.
4 Comments
Green_ya 12 Oct, 2022 @ 2:19am 
Can I send massege to chat from ingame script?
Arachnade 11 Feb, 2020 @ 6:37pm 
This sounds like a cool idea i just have no idea how i would use it personally.
avaness  [author] 10 Sep, 2019 @ 2:22pm 
I am working on a "Panels" feature that will use the text hud api, It will have the same arguments as messages except with position.
If anyone has any suggestions please let me know.
Georgik  [developer] 9 Sep, 2019 @ 2:37am 
I love the idea, but it would be very nice to also make a use of Text Hud API to show nice message window at custom position, maybe even more control over visuals (colors, etc)
Nice job anyways