Space Engineers

Space Engineers

49 vurderinger
Hud Alert API
   
Pris
Føj til foretrukne
Gjort til foretrukken
Fjern som foretrukken
Type: Mod
Mod category: Script
Tags: hud
Filstørrelse:
Offentliggjort:
Opdateret:
185.150 KB
7. sep. 2019 kl. 20:58
20. sep. 2019 kl. 17:49
3 ændringsbemærkninger ( vis )

Abonner for at downloade
Hud Alert API

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