Space Engineers

Space Engineers

Ocen: 49
Hud Alert API
   
Przyznaj nagrodę
Ulubione
Ulubione
Usuń z ulubionych
Type: Mod
Mod category: Script
Tagi: hud
Rozmiar pliku
Zamieszczono
Zaktualizowano
185.150 KB
7 września 2019 o 20:58
20 września 2019 o 17:49
Listy zmian: 3 ( zobacz )

Zasubskrybuj, aby pobrać
Hud Alert API

Opis
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.
Komentarzy: 4
Green_ya 12 października 2022 o 2:19 
Can I send massege to chat from ingame script?
Arachnade 11 lutego 2020 o 18:37 
This sounds like a cool idea i just have no idea how i would use it personally.
avaness  [autor] 10 września 2019 o 14:22 
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  [producent] 9 września 2019 o 2:37 
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