I have a mod for rally pacenote playback (linked below), and I'm looking for a LUA way to get the current race time (3 2 1 countdown) before a race start. My intention is to play audio queues for 3, 2, 1, go. I've found that there is a GUI hook for the race start app, but I specifically want to do it even if my mod's GUI isn't there https://www.beamng.com/resources/custom-rally-pacenotes.32263/
If the race is a scenario this line seems to works: Code: scenario_scenarios.onSerialize().countDownTime For a different gameplay mode there might be something similar but I haven't really looked too deep so I don't know if you can access the value through public getters. And unfortunately there doesn't seem to be any extension hook for each number, there's onCountdownEnded and onCountdownStarted. These aren't the same as GUI hooks because GUI hooks don't trigger lua functions so you can't really use them for anything other than GUI stuff (unless you have the GUI active which can then call lua after the gui hook function is called).
I did find I could hook into onCountenStarted but the only thing worse than no countdown is a poorly timed countdown - thanks for the insight