Welcome, Guest! Login | Register
Detecting car reverse?
Info
Report
91 Posts

Just going through the PCar's outputs in the scripts, and I've noticed that there's no way of actually detecting if the car is going backwards instead of forwards, not without using an EoI. Is there some method I'm not aware of or there is no real way of checking for reverse?
Created on: 3 months ago
Info
Report
91 Posts

Well I answered my own question this time :P

Through trial and error, I've found that the best way to determine if a car is going reverse to use an EventOnInput object bound to the same key as the car reverse. Then, in a script, put the following:
if(spd0 > 0){
   if(IN_3 == 0){
      if(IN_528 > 0){
         iPrint("r", -10.5,-6.6, OBJ_88);
      }else{
         iPrint(gear, -10.5,-6.6, OBJ_88);
      }
   }else{
      if(IN_3 > 0){
            iPrint("B", -10.5,-6.6, OBJ_88);
      }
   }
}else{
      iPrint("N", -10.5,-6.6, OBJ_88);
 }
spd0 is the speed of the car and can be simply IN_0 from the car. IN_528 is the EOI object that is bound to the reverse (usually the down arrow ⬇). OBJ_88 is your Textprint, change it to suit.
Created on: 3 months ago
Reply
Preview
Post
Or use the advanced reply form here...
Sponsored