home *** CD-ROM | disk | FTP | other *** search
/ Magazyn WWW 2001 May / cd49www.iso / inne / soh_vrtour / panoswf / pano_38.swf / scripts / DefineSprite_54 / frame_2 / DoAction.as
Text File  |  2001-02-22  |  481b  |  32 lines

  1. counter += 1;
  2. if(counter < 2)
  3. {
  4.    aRPM = RevScaler;
  5. }
  6. throttle = eval("/DragControllerInst/:DragOutput") + RevScaler;
  7. if(aRPM < throttle)
  8. {
  9.    inertia = accel;
  10. }
  11. if(throttle < aRPM)
  12. {
  13.    inertia = deccel;
  14. }
  15. if(aRPM < throttle)
  16. {
  17.    aRPM *= inertia;
  18.    if(throttle < aRPM)
  19.    {
  20.       aRPM = throttle;
  21.    }
  22. }
  23. if(throttle < aRPM)
  24. {
  25.    aRPM *= inertia;
  26.    if(aRPM < throttle)
  27.    {
  28.       aRPM = throttle;
  29.    }
  30. }
  31. EngineOutput = (aRPM - RevScaler) * 0.25;
  32.