Hello! I want to make a mod in Beamng that gives you a full black screen when you crash for 3 seconds, I have made the UI, but i have real hard times figuring out the scripting. Can anyone help me please! I will really appreciate it! Thank You!
No... Im still trying to learn and its not easy, but i wont give up. i will learn it soon, Do you want to help me or just asking?
My mod has that feature, without going too much into details once you got your death screen UI built there's a few steps to use it: 1. When a death causing crash is detected (through a lua script) you switch to the UI layout that only has your death screen app. 2. Depending on what you want you can then start a fade in animation, increasing the opacity of the black color over like a second. 3. Have some buttons that the user can press to reset/respawn or do it automatically after a certain delay. If you haven't done so already I suggest you take a look at some code for basic UI apps to know what you need to do to interact between lua and your UI app. You can call javascript functions from lua using guihooks.trigger and basically do the same from js to call lua functions. To detect your death causing crash it's mostly going to involve G force values.