Hi!
Can someone tell me if there any way to make js analog for nscalc changed() function? I tried to use setTimeout, but it's not defined.
My case is to make visible last lap time text only when car cross the s/f line. So in nscalc it easy to write with changed(), but I want to write it in js as all other fx for dash use js also.
Thanks!
Hi,
I use this:
function changed(delay, value) {
root['time'] = timespantoseconds($prop('SystemInfoPlugin.Uptime'));
root['oldstate'] = root['oldstate'] == null ? value : root['newstate'];
root['newstate'] = value;
if (root['newstate'] != root['oldstate'])
{
root['triggerTime'] = root['time'];
}
return root['triggerTime'] == null ? false : root['time'] - root['triggerTime'] <= delay/1000;
}
Hi, I have this script to make the drs enable text appear on the 3rd lap. I would like this text to be visible for 10 seconds. What formula should I implement. Thank you!!!
var Leader = $prop('GarySwallowDataPlugin.Generic.LeadLap');
if (Leader == 3) {return true}
else return false