Configuring the resource
Smart Tyre is highly configurable, allowing you to change all elements of the resource.
Last updated
Was this helpful?
Smart Tyre is highly configurable, allowing you to change all elements of the resource.
Last updated
Was this helpful?
To begin configuring the resource, open the config.lua file.
The controls used in the resource can be changed in this section. For a full list of controls, see the list . You should only need to change the number of the second value.
This section allows you to set the chance of a wheel becoming damaged (punctured) on a crash, burnout or random chance. These have been set to low values by default.
These values must be a number between 0.0 and 1.0. 0.0 means it will never happen and 1.0 means it will be guaranteed to happen every time.
This section allows you to set the type of damage that will be incurred to a tyre on a specific event, such as a crash, burnout or randomly caused puncture.
By default, we have set all three actions to gradually deflate the tyre. By setting gradual to true, you are activating the gradual deflation mode. Tyres will initially be set to the damage property in terms of the amount of air in them, with this being a value between 0.0 and 1000.0.
The goToRim property allows you to determine whether you want the tyre to eventually go to the rim. The time property determines the speed at which the tyre will go to the rim if the player continues to driver whilst on a puncture, rather than changing it for the spare tyre.
By disabling the gradual property, tyres will go straight to the rim. If you do not want tyres to go to the rim at all, you can disable goToRim.
For example, based on the current configuration options above, the following will happen for a crash:
The tyre will deflate down to 300.0 out of 1000.0 soon after a crash.
If the player continues to drive, this will go down to the rim over the next 30 seconds.
The deflationTime is a default fallback option if the wheelPunctureTypes was not specified above.
The reducePower option allows you to cut power to the wheel when a tyre is deflated.
The reduceSteering option allows you to restrict steering when a tyre is deflated.
The gradualHandlingEffect option allows you to implement gradual changes to handling when a tyre is deflated.
The maxSpareSpeed property allows you to set the maximum speed at which a player can drive with a spare tyre, before there is a chance that the wheel can fly off.
The wheelFlyOffChance property is a value between 0.0 and 1.0. This is the chance that the wheel will fly off the vehicle is the maximum spare speed is exceeded above. This is set to a low value by default.
The setWheelOnFire property allows you to determine whether the vehicle will be set on fire if a player continues to drive the vehicle after a spare wheel has flown off.
The setWheelOnFireAfter property allows you to determine the amount of time (in seconds) that the vehicle will be set on fire if a player continues to drive after a spare wheel has flown off.