Variables for gamemode use in Trackmania:
PlayerSpeed - contains player speed
PlayerSpin - contains player spin between 0-360
HitBoxCollide - True when normal hitboxes of two or more cars collide, used for:
-Police pursuits, so the suspect after being hit by police can be forced to spec and round ended.
-Bomb mode, one of the players spawns wih the bomb and has to pass it to the next person. After one minute bomb explodes, everyone gets points except for the guy who exploded.
-making traffic jams on maps using ghosts in MT, so upon hitting a car you're respawned.
PlayerDrift - true when player is sliding
DriftCounter- contains distance of drifts in meters
OnGround - true when no part of car hitbox touches anything, used for stunts:
A cooperation gamemode where plyers have to get a sum of x seconds of airtime before round end.
WheelsOnGround - true when at least one wheel touches ground, unlike above doesn't trigger when roof touches ground. Used for the same as above, but can be used to cancel points if the player landed on roof.
NumberOfWheelsOnGround - used to prize wheelies or desertcar style turns.
AirSpin - variable that contains the difference between the car spin when it set off and landed. Used as above but with sum of spins.
GasPressed - true when player pushes gas button.
BrakePressed - analogic as above.
GasPossible - when true player can hit gas.
BrakePossible - analogic as above. Can be used for gamemodes where player mustn't slow down
GasTimer - contains number of seconds the gas has been pressed.
BrakeTimer - same.
HitboxInZone - true when car's hitbox collides with offzone. can be used for:
-burnout paradise style billboards hitting
-improving endurance gamemode by TGYoshi: cars have to keep up with the leader by staying in offzone, which is in a shape of sphere centered in leader's car; with a radius of 100m
-RPG cooperation mode where player have to wait for each other and not leave the offzone around the slowest player
AccelerationMultiplier - used for:
-slowing down the leader's car
-slowing car down uppon hitting an object
Handling multiplier - same as above, but affects the turn radius.
both of the above can be used for choosing a vehicle class before a race - muscle (acceleration), exotic(speed) or tuner(handling)
What can these solve?
Pit stop system requested
here:
-HitboxInZone used to check if player is in pitstop
-PlayerSpeed used to check if player is standing
-GasTimer to measure and consume fuel.
If (600s-GasTimer<0) GasPossible=false;
If (HitboxInZone==true && PlayerSpeed==0)
{
GasPossible=false;
sleep (5000ms);
}
GasTimer=0;
Adding functionality to modes will greatly increase diversity in servers, as long as it won't require a separate titlepack.