how to read Scenario Variables for Air Race #111
Replies: 1 comment 1 reply
-
Hi! Sorry - I didn't notice your question before now. I haven't tested this myself, but I believe you need to use const RACE_LAP_EVENT_ID = 0; // Must be unique
const RACE_END_EVENT_ID = 1; // Must be unique
handle.subscribeToSystemEvent(RACE_LAP_EVENT_ID, "RaceLap");
handle.subscribeToSystemEvent(RACE_END_EVENT_ID, "RaceEnd");
handle.on("eventRaceLap", (recvEventRaceLap: RecvEventRaceLap) => {
console.log("Lap event", recvEventRaceLap);
});
handle.on("eventRaceEnd", (recvEventRaceEnd: RecvEventRaceEnd) => {
console.log("Race ended", recvEventRaceEnd);
}); I'm not sure if this will work in MSFS 2020 though, since I couldn't find the Anyways, I hope this was helpful! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi
I'm fighting to find a way forward to read all available Race data with node-simconnect
I know by reading the doc that this RecvEventRaceLap holding the data i need, I just don't know how to write the code to use it !
How to????? Please
Beta Was this translation helpful? Give feedback.
All reactions