Space Engineers

Space Engineers

49 arvostelua
Hud Alert API
   
Palkinto
Lisää suosikkeihin
Lisätty suosikkeihin
Poista suosikeista
Type: Mod
Mod category: Script
Tunnisteet: hud
Tiedostokoko
Julkaistu
Päivitetty
185.150 KB
7.9.2019 klo 20.58
20.9.2019 klo 17.49
3 muutosilmoitusta ( näytä )

Tilaa ladataksesi
Hud Alert API

Kuvaus
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 kommenttia
Green_ya 12.10.2022 klo 2.19 
Can I send massege to chat from ingame script?
Arachnade 11.2.2020 klo 18.37 
This sounds like a cool idea i just have no idea how i would use it personally.
avaness  [tekijä] 10.9.2019 klo 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  [kehittäjä] 9.9.2019 klo 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