Space Engineers

Space Engineers

49 beoordelingen
Hud Alert API
   
Prijs
Toevoegen aan favorieten
Toegevoegd aan favorieten
Verwijderen uit favorieten
Type: Mod
Mod category: Script
Tags: hud
Bestandsgrootte
Geplaatst op
Bijgewerkt op
185.150 KB
7 sep 2019 om 20:58
20 sep 2019 om 17:49
3 wijzigingsnotities (weergeven)

Abonneren om te downloaden
Hud Alert API

Omschrijving
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 opmerkingen
Green_ya 12 okt 2022 om 2:19 
Can I send massege to chat from ingame script?
Arachnade 11 feb 2020 om 18:37 
This sounds like a cool idea i just have no idea how i would use it personally.
avaness  [auteur] 10 sep 2019 om 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  [ontwikkelaar] 9 sep 2019 om 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