Does anyone know how to get the ignitionState of a vehicle from GE lua? I want to check if a vehicle inside a trigger has the ignition turned off. What functions would I have to use for that? I already know that this value is stored in electrics.values.ignitionLevel on vehicle lua side, but I haven't found a way to access this value from GE lua. Update: I was able to figure it out. I wrote two extensions, one for GE lua and one for vehicle lua. The vehicle lua extension is called from GE lua side and updates a value in the GE lua extension, which can then be accessed by GE lua.
You can also use the core_vehicleBridge extension for this. Code: core_vehicleBridge.registerValueChangeNotification(vehicle, "ignitionLevel") Code: core_vehicleBridge.getCachedVehicleData(vehicleID, "ignitionLevel") Code: core_vehicleBridge.unregisterValueChangeNotification(vehicle, "ignitionLevel")