====================================================================
"Using.txt" - List of all keys, buttons and controls for Move_Car package V1.1 April 21, 2002
====================================================================
The more common controls are immediately availble on the keyboard, mouse or joystick.  
More advanced controls or effects can be set through table entries in the Move_Car.wdl 
C-Script.  Some advanced settings are explained later in this document.  All advanced 
settings and table entries are discussed in the documentation file, "Changes.txt".
____________________________________________________________

CONTROL ASSIGNMENTS
KEYBOARD:
Cursor "up/down" keys - Throttle
Cursor "left/right" keys - Steering
"H"  - Horn
"SHIFT" - forced "downSHIFT"
"S" - Steering Toggle
"T" - Throttle Toggle
"V" - change camera Views
"X" - handbrake

MOUSE:
left/right motion - steering
forwards/backwards motion - throttle
left button - forced downshift
middle button - change camera views
right button - horn

JOYSTICK:
stick left/right - steering
slider - throttle
button 1 - handbrake
button 2 - reserved for vehicle reset, after crash
button 3 - horn
button 4 - change camera views
button 5 - forced downshift
buttons 6 - 8 - not assigned
stick forward/backward or twist - not assigned
hat switch - not assigned

NOTE:  Horn, change camera view, forced downshift and handbrake are always active, 
regardless of which input mode is selected.  Mouse does not have a handbrake.
All standard template key assignments remain active, except mouse right button to 
display the cursor.
____________________________________________________________
DISABLING FEATURES
There are "Table Entries" in the C-Script Move_Car.wdl file to turn off various features, 
such as: Engine sound, Horn sound, Tire squeal sound, Rear View Mirror and all of the
On-screen displays (HUD).  See lines 51 through 56.
____________________________________________________________
STEERING
Vehicle steering can be assigned to the keyboard, mouse or joystick by pressing the 
"S" key on the keyboard.  The "S" key is a toggle switch, and will cycle through all 
three forms of input.  A text display (between the speedometer and the tachometer) 
indicates which input mode is currently active.  Only one of the three steering input 
modes can be active at any time.  The steering input mode can be different than the 
throttle input mode.  At higher speeds, sharp turns may cause the tires to squeal.
The vehicle will lean in turns.

Keyboard steering uses the "Left - Right" cursor arrow keys.  Pressing and releasing 
one of the left / right arrow keys will cause the vehicle to turn slilghtly.  Holding the 
key down will cause the vehicle to turn faster.  Releasing the key will immediately 
stop the vehicle from turing.

Mouse steering is controlled by the left-right movement of the mouse.  Faster/farther 
movement of the mouse will cause the vehicle to turn faster.  Vehicle turning stops 
when the mouse quits moving.  The mouse cursor is not visible on the screen.  

Joystick steering is controlled by the left-right movement of the joystick (the x-axis).  
Faster/farther movement of the joystick will cause the vehicle to turn faster.  
Vehicle turning continues until the joystick is returned to the center position.  
__________________________________________________________________
THROTTLE   (Integrated accelerator, brakes, and reverse)
This combination control can be assigned to the keyboard, mouse or joystick by pressing 
the "T" key on the keyboard.  The "T" key is a toggle switch, and will cycle through all three 
forms of input.  A text display (between the speedometer and the tachometer) indicates
which input mode is currently active.  Only one of the three throttle input modes can be 
active at any time.  The throttle input mode can be different than the steering input mode.
The throttle (accelerator) controls the amount of acceleration.  Rapid changes in 
acceleration may cause a "rock back" effect, and tire squealing.

The throttle control, at the low end of it's range, provides an automatic shift into reverse 
gear, while providing an accelerator for reverse motion.  (Reverse is approximately 15% 
of the total throttle travel.)
As the throttle is advanced above reverse, a "dead spot" area is used to apply the brakes.  
This area is approximately 5% of the total throttle travel.  The automatic transmission 
will shift into forward gear.
Above the brakes are the forward gears, and forward accelerator.  This area is
approximately 80% of the total throttle travel.  The automatic transmission will shift into 
higher gears, according to engine RPM and other table entry settings, as described later
in this document.
Each of the three control areas are shown in an on-screen throttle "thermometer".
Additionally, each area is color coded: White is reverse, red is braking, and green is 
forward.  A vertically moving blue arrow is used to indicate the position of the throttle.

Keyboard throttle uses the "Up - Down" cursor arrow keys.  Pressing and releasing one 
of the up / down arrow keys will cause the throttle to move slightly.  Holding the key 
down will cause the throttle to move farther.  Releasing the key will immediately stop 
the throttle movement.  The throttle will hold it's position until the next up / down cursor
arrow key is pressed.

Mouse throttle is controlled by the forward-backward movement of the mouse.  
Faster/farther movement of the mouse will cause the throttle to move faster/farther.  
Throttle movement stops when the mouse quits moving.  The throttle will hold it's 
position until the mouse moves again.  The mouse cursor is not visible on the screen.

Joystick throttle is controlled by the setting of the slider (throttle) on the joystick.  
The joystick slider can be rapidly moved from one extreme to the other, forward 
and reverse.  The throttle holds the position set by the slider.
___________________________________________________________
Some TIPS:
Having both the steering and throttle controlled by the mouse can cause unintended
changes.  For example, moving the mouse to control steering will also adjust the 
throttle if there is any forward or backward movement of the mouse.

The current position of the joystick slider or stick is used as soon as the joystick 
is selected, either for steering or throttle.  If not selected, moving the joystick 
slider or stick will not have any effect.

You can quickly go from full forward throttle, to full reverse.  The transmission 
will not immediately shift into reverse gear, but instead will apply the brakes until 
the vehicle comes to a full stop.  If the throttle is still in the reverse position, the 
transmission will then shift into reverse, and the vehicle will accelerate according 
to the throttle setting.

When brakes are applied, a "clutch" automatically disengages the drive train from
the wheels, to keep engine power from opposing the brake.  However, when the
hand brake (described next) is applied, engine power is not disconnected.
It is possible to apply both the throttle (pedal) brakes and the hand brake at the 
same time for maximum braking; the drive train will be disconnected.

If the throttle is reduced, air drag, rolling resistance and engine braking will slow
the vehicle.  More powerful engine braking is available by forcing a downshift.
(Forced downshifting is described later.)

If "Maximum RPM" is reached, the vehicle will not continue to accelerate.
A forced downshift which results in maximum engine RPM, will not provide
any power for acceleration.

If the vehicle goes airborne, the only active forces will be air drag and gravity.
Steering, throttle and handbrake have no effect until the vehicle lands.
_______________________________________________________
HANDBRAKE
The "handbrake" is the "X" key on the keyboard, and the "trigger" or number
one button on the joystick.  The only difference between the handbrake and
the braking action of the integrated throttle control is the "clutch" effect.  The
handbrake will not "clutch" or disconnect the drive train.  It is not as effective
as the "pedal" brakes, but can be applied more quickly.  If you are using the 
joystick, you can pull the "trigger" to get quick braking for a turn, and when 
you release the handbrake, the throttle is still at the same previous position.

The handbrake does not provide any "spin out" or skidding effects.  The 
Move_Car script does not consider the type of surface the vehicle is on, or
how much the car should skid, or spin.  Skids and spins, will have to be added 
through additional C-Script programming.
_______________________________________________________
FORCED DOWNSHIFTING
You can activate a forced downshift (to a lower gear) by pressing the "SHIFT"
key on the keyboard, the left button on the mouse, or button number 5 (if you 
have one) on the joystick.  All three of these buttons are active at all times, 
regardless of the input mode you have selected.  So even if you are in joystick
mode for steering or throttle, or both, you can still press the "SHIFT" key on the
keyboard, or the left button on the mouse, to cause a downshift.
The downshift stays in effect as long as you hold the button down.  (You can 
prevent the vehicle from doing a normal, automatic "upshift".)

Q.  Why would you want to downshift?  
A.  To get more acceleration.  The torque lookup table provides more engine 
      power at higher RPMs, just like a real engine.  And, a lower gear will 
      usually provide more power for acceleration.

Some things to note:
1.  You can not "downshift" from first gear, or from reverse gear.
2.  If your downshift causes you to reach maximum engine RPM, you will
     not get any acceleration at all.  (The engine is "maxed" out!)
3.  You can get an unexpected result from downshifting.  For example, let's 
     say you are in 3rd gear, and downshift to 2nd gear for more power.  
     The vehicle accelerates, and you release the downshift.  By this time, 
     the vehicle may have increased speed (and thus engine RPM) enough
     to automatically upshift to 4th gear.  So you downshifted from 3rd to 2nd,
     and when you came out of the downshift, you are now in 4th gear.  
     Simply do another downshift to go down to 3rd gear, and get more 
     acceleration.
4.  "SHIFT" may have not been a good choice for the key to use for this, since
     other functions you create may want to use the SHIFT key to reverse the
     direction of a function.  (I just couldn't resist using "SHIFT" for a shift function!)
     To assign a different key, go to line 316, and change "key_shift" to "key_'whatever'".
[Use_Gear = gear-(key_shift || mouse_left || joy_5); // Sets gear to use - possible down shift ]
________________________________________________________
HORN
The horn is always active and can be sounded by pressing the "H" key on the
keyboard, the right button on the mouse, or button number 3 on the joystick.
All three of these keys/buttons are always active, regardless of the input mode
you have selected.
The horn will continue to sound as long as you keep the key/button pushed.
________________________________________________________
CAMERA VIEWS
The standard templates use the F7 key to switch camera views.  However, 
the Car_Cam script uses the "V" keyboard key, the middle mouse button (if you 
have one), or joystick button number 4.  These controls are always active, 
regardless of the input mode you have selected.  You can reassign any of these
keys/buttons by going to the very end of the Car_Cam.wdl script, and changing
which key/button is used for each input device.
The views are:
1.  Ahead View - You are looking forwards, out of the windshield.  None of the
     vehicle is visible.
2.  Behind View - You are behind, and slightly above the vehicle.
3.  Helo (Helicopter) View - Father behind the vehicle, and higher than the "Behind"
     View.  The position of the camera remains fixed behind the vehicle.
4. Follow View - Same as Helo View with one important difference:  As the 
     vehicle speeds up, the camera will move farther behind the vehicle, and higher.
     When the vehicle slows, or stops, the camera "catches up" or appears to zoom
     in on the action.
5.  Overhead View - This is a view from above the vehicle, looking down.  Make
     sure your sky box is tall enough for the camera, or you will get a bad looking view!
_________________________________________________________
ADVANCED SETTINGS

The advanced settings are controlled through table entries, in the C-Script coding.
You will need a text editor to make these changes.  

(Do NOT use Wordpad, Word for Windows, or any other word processing software.  
Those applications will insert hidden control characters into the script. The compiler 
will no longer be able to use the C-Script file, and you will get some really strange 
compile errors!)
==========================================================
More in-depth information is contained in the documentation file, "Changes.txt".
==========================================================
The advanced settings control the physics calculations within the script.  Thus, you
can change the math, without having to change (or understand) what the script is 
doing, or how it is doing it.  (It's a lot like the "skills" settings in WED.  But the 
Move_Car script does not use any skills or flags.  All of the controls are in the
script itself.)

Before making any changes, it's a good idea to make a backup copy of the C-Script
file.  Just copy it to another folder.  Copy it back in case things get really messed up!

When you open Move_Car.wdl, you will find tables of variables near the beginning of
the script.  The comments tell you which variables are meant to be changed.  Some
variables have comments that end with "(calculated)".  This means the value of the
variable is computed by the script.  Generally, you shouldn't try to change "calculated"
variables, since whatever you enter will be overwritten by the script when it does it's
calculations.  However, should you do any C-Script programming, these variables are
available for you to read.  
All variables are defined at the beginning of the script, and all variables have comments.
The only exceptions to this, are the values for the gear ratios.  They are in a clearly 
marked table near the end of the script file.

When you change a table entry, you may get unexpected results.  For example, if you 
change the number of gears from four to six, or if you change the gear ratios, you may
find the automatic transmission doesn't work quite right anymore.  You will probably 
also have to change the RPM settings where the automatic transmission up shifts, 
and down shifts.

You can change the engine power with a single table entry.  However, you may not
get the results you want.  The maximum speed of the vehicle is controlled by more
than just engine power.  The script also calculates Air Drag and Rolling Resistance.  
When engine power balances with Air Drag and Rolling resistance, the vehicle has 
reached it's maximum speed.  Rolling Resistance has more effect at slower speeds, 
while Air Drag has more effect at higher speeds.

If you are just looking for quicker acceleration, simply change the value of Accel_Val.
This variable determines how quickly the vehicle accelerates.  It does not have any 
effect on engine power, or maximum speed.

The amount of "rock back", squealing, and leaning in corners can also easily be set
through table entries. 
The following is a list of all the table entries you can easily change.  For more detailed
information on each of these variables, please see the documentation file, "Changes.txt".
______________________________________________________________
(Tables are located near the beginning of the script file.)

///////////////////////////////////////////////////////////////////////
//          Car Specific values                           ///
//  Change these values for different vehicles ///
//////////////////////////////////////////////////
  var Brake_Torque = 100000;       // Stopping force (arbitrary number)
  var Car_Weight = 3600;              // Total car weight, in pounds  
  var differential_ratio=2.73;          // Ratio of the differential gear  
  var Drag = 0.29;                         // Air friction (A Corvettte is 0.29)
  var gear_efficiency = 0.8;           // Overall gear efficiency
  var Horse_power = 400;             // Rated enigne horsepower - will be converted to Max_Torq  
  var num_gears = 4;                    // Number of forward gears (at least 1, but no more than 6)
 // *** Specify actual gear ratios in the Car_Init() function (near the end of this script)  ***
  var wheel_radius_inch = 15.0;    // Wheel radius, in inches
/////////////////////////////////////////////////////////
//  Other table values you can adjust  //
/////////////////////////////////////////////////////////
  var A_Chirp = 0.2;          // Amount of acceleration to cause tire squeal, or "chirp"
  var Acel_Val = 6;           // Acceleration value - increase to accelerate slower
  var car_sstrength = 1;     // Increase to make steering quicker and more effective
  var car_tstrength = 1;      // Increase to make throttle quicker and more effective
  var Corner_Lean = -0.1;  // Leaning amount for cornering, reverse sign to reverse lean
  var DnShift = 3500;         // Specify RPM to automaticaly down shift to a lower gear
  var Hill_Effect = 4;         // Power gain/loss on a hill (Bigger number is less effect)
  var Max_RPM = 7000;   // Maximum allowed engine speed
  var Rock_Back = .8;       // For accelerating and braking - set high for wheelies
  var steer_damage = 1;    // Usually always = 1, but can be varied to simulate damage
  var T_Chirp = 0.4;          // Turning force needed to cause tire squeal, or "chirp"
  var Turn_Effect = 4;       // Power gain/loss when turning (Bigger number is less effect)
  var UpShift = 6000;        // Specify RPM to shift to higher gear (+500 if accelerator floored)        
 
// Features you can turn off - Set to zero for OFF, non-zero for ON  
  var Eng_Snd_On = 1;     // Engine sound
  var Horn_Snd_On = 1;   // Horn sound
  var Squeal_On = 1;        // Tire squeal sound
  var RV_Mirror_On = 1; // Rear_View Mirror
  var Car_Hud_On = 1;    // On-screen displays
____________________________________________________
Table (function) near the end of the script file  

///////////////////////////////////////////////////////////
// Function Set_car_values()      (parameters)
//   Unused gears can be any value
//
function car_init()        
{ 
//     Set gear ratios here - Don't forget to also set "Num_gears"
  gear_ratio[0] = 2.29;     // Reverse gear
  gear_ratio[1] = 3.06;     // First gear
  gear_ratio[2] = 1.62;     // Second gear
  gear_ratio[3] = 1.0;      // Third gear
  gear_ratio[4] = 0.8;      // Fourth gear 
  gear_ratio[5] = 0.0;      // Fifth gear 
  gear_ratio[6] = 0.0;      // Sixth gear 
______________________________________
See the documentation file "Changes.txt" for more detailed information.
Tips on making changes for other types of models can be found in the 
documentation files "Other_models.txt" and "Other_models2.txt"