Is it possible to have a variable that is the g-forces acting on the car. Is this right? Code: MyAppsName.prototype.update = function(streams){ //convert to G var gForces = {}; $.each(streams.sensors, function(index, val) { gForces[index] = val / 9.81; }); and would the variable be: gForces The second question is how is it possible if that variable is greater than, say, 1 it will print out "Crashed"? Is this right? Code: if ('gForces' > 1) { $("<h1>Crashed</h1>").appendTo(this.rootElement); } and have it stay like that until the car is reset. I have a thing earlier in the app that will say "Alive" can I make it loop back to the begging once the car is reset. Copied from Some-questions-about-app-development Please delete that other thread, as this is the correct section.
Among the built-in apps is a g-meter. The variable you need is used in that. Just open it up and find it. I'd find it for you, but I'm a bit busy ATM and don't have BeamNG installed on this machine.