Category | Scripting |
Created | 05.01.2021 20:59 |
Mike Freight (Mikey) | 05.01.2021 20:59 |
---|---|
Hello, I don't know anything about Gui and I want to ask how I can make or call notifications like this ? Not necessarily for vehicle. For example when player enters trigger in placeable building. https://ibb.co/wN3dGQn Thank you in advance ! |
Bilbo Beutlin (BBeutlin) | 05.01.2021 21:37 |
---|---|
The easiest method is the usual notification in upper right corner: g_currentMission:addIngameNotification(color, text); where color is an array { red,green,blue,saturation } like eg. { 0.0, 1.0, 1.0, 1.0 } |
Mike Freight (Mikey) | 05.01.2021 23:54 |
---|---|
I can add this type of notification, I care about notification like on the screenshot I have attached. My guess is it will be more demanding doing this. Where could I possibly see how it is written ? Because I could not personally find it in the documentation. |
Bilbo Beutlin (BBeutlin) | 06.01.2021 10:00 |
---|---|
I don't know. But quite sure it is a GUI element listed in LUADOC Script -> GUI. |
Bilbo Beutlin (BBeutlin) | 06.01.2021 15:45 |
---|---|
Addendum: I was just looking for something else and randomly came across this attach display. It is part of AttacherJoints.lua function onUpdateTick(): line #646: g_currentMission:showAttachContext(info.attachable) Doesn't look like you can use it for arbitrary custom purposes. If you don't like the upper right notification, you could use a general alert g_currentMission:showBlinkingWarning(text, duration); |
Mike Freight (Mikey) | 06.01.2021 16:03 |
---|---|
Actually me too already found it, and I found its source. Now I have to figure out how to do it. Thanks for help ;) |
Note: Log in to post. Create a new account here.