HUDScript

This is the script which controls the HUD in the demo.

Variables
Target - The target vehicle.

Cam - The main camera.

Meters - The frame of the HUD elements.

Boost Meter - The meter object which shows how full the boost is.

Temp Boost Meter - Secondary boost meter for boost types 1 and 3.

RPM Meter - The meter showing how high the RPM's are of a vehicle. This is not based on actual RPM's, but rather the pitch of the engine sounds.

Meter Shade - The visual object which shades the meters.

Meter Back - The visual backing of the meters.

Speedometer - The speedometer text.

Speedometer Shadow - The shadow of the speedometer text. Can be null.

Stunt Score - The text showing how far a vehicle has jumped and drifted.

Stunt Score Shadow 0-3 - The outlines of the stunt score text. Can be null.

Stunt Score Small - The text showing a vehicle's previous stunt.

Stunt Score Shadow Small 0-3 - The outlines of the stunt score small text. Can be null.

Total Score - Text showing the total points earned from stunting.

Total Score Shadow 0-3 - The outlines of the total score text. Can be null.

Temp Score - Text showing the points being earned in the current jump.

Temp Score Shadow 0-3 - The outlines of the temp score text. Can be null.

Gear - The text showing which gear the vehicle is in.

Gear Shadow - The shadow of the gear text. Can be null.

Chain Number - The text object showing the current boost chain of the vehicle. Only valid for boost types 1 and 3.

Chain Number Shadow - The shadow of the chain number text. Can be null.

Comboost Meter - The meter mesh used for boost types 1 and 3.

Comboost Meter Back - The visual backing mesh of the meters used for boost types 1 and 3.

Comboost Meter Shade - The shading object for meters using boost types 1 and 3.

Comboost Text - The actual text showing the current boost chain of the vehicle. Only valid for boost types 1 and 3.

GUI Light - The light cast upon the meters.

Boost Colors - The colors used on the booost meter depending on the boost type of the vehicle.

Hidden Variables
These are variables which are not visible in the inspector, yet useful for writing scripts.

targetScript - The VehicleParent script of the target vehicle.

distUnit - The multiplier for distance depending on the metricUnits variable of ControlScript.

metric = 1

imperial = 1.094

distUnit2 - The string appended to text showing the distance of jumps and drifts.

metric = " m"

imperial = " yds"

SpeedUnit - The multiplier for the speedometer.

metric = 3.599

imperial = 2.237

stuntTextPrev - The string for the last stunt performed. This is for the stuntScoreSmall object.