SetVehicleModelWheelSize: Difference between revisions
(Document function introduced in r20642) |
Fernando187 (talk | contribs) (Remove obsolete Requirements section) Tag: Manual revert |
(One intermediate revision by one other user not shown) | |
(No difference)
|
Latest revision as of 17:22, 7 November 2024
This function sets the size of a group of wheels for a vehicle model. The wheel size mainly determines their width, collision box (used to check if a bullet hits a tire, for example) and the ground clearance of vehicles with that model (i.e., the minimum distance from the center of the car geometry to the ground). It also changes the visual scale and rotation of the wheels, if not all the wheel groups have equal size. The visual scaling is applied before the per-vehicle wheel scale.
Syntax
bool setVehicleModelWheelSize ( int vehicleModel, string wheelGroup, float wheelSize )
OOP Syntax Help! I don't understand this!
- Method: Vehicle.setModelWheelSize(...)
- Counterpart: getVehicleModelWheelSize
Required Arguments
- vehicleModel: The vehicle model ID.
- wheelGroup: The group of wheels of the vehicle model that will have its size set by this function. The following values are supported:
- front_axle: Represents the wheels in the front axle. The default value for this group is read by GTA from the WheelScale_Front field of the vehicles.ide data file.
- rear_axle: Represents the wheels in the rear axle. The default value for this group is read by GTA from the WheelScale_Rear field of the vehicles.ide data file.
- all_wheels: Convenience group that contains the other wheel groups: front_axle and rear_axle.
- wheelSize: The wheel size value to set. Default GTA values for automobiles usually are around 0.7. It must be greater than 0.
Returns
Returns true if the size for the specified wheel group and vehicle model has been set successfully, or an error if some parameter is invalid.
Example
This example replaces the Infernus model with a Huntley model and sets the intended wheel scale for the new model accordingly, so that the vehicle does not look sunken into the ground.
engineImportTXD(engineLoadTXD("huntley.txd"), 411) engineReplaceModel(engineLoadDFF("huntley.txd"), 411) setVehicleModelWheelSize(411, "all_wheels", 0.9) -- Default Huntley model wheel size, from default vehicles.ide
This example sets the rear axle size of the Bandito to a high value, to showcase its effect and make it more funky.
setVehicleModelWheelSize(568, "rear_axle", 1.8) -- 0.7 is the usual value
See Also
- areVehicleLightsOn
- getHeliBladeCollisionsEnabled
- getHelicopterRotorSpeed
- getVehicleAdjustableProperty
- getVehicleComponentPosition
- getVehicleComponentRotation
- getVehicleComponents
- getVehicleComponentScale
- getVehicleComponentVisible
- getVehicleCurrentGear
- getVehicleDummyPosition
- getVehicleGravity
- getVehicleLandingGearDown
- getVehicleModelDummyDefaultPosition
- getVehicleModelDummyPosition
- getVehicleModelExhaustFumesPosition
- getVehicleModelWheelSize
- getVehicleNitroCount
- getVehicleNitroLevel
- getVehicleWheelFrictionState
- getVehicleWheelScale
- isTrainChainEngine
- isVehicleNitroActivated
- isVehicleNitroRecharging
- isVehicleOnGround
- isVehicleWheelOnGround
- isVehicleWindowOpen
- resetVehicleComponentPosition
- resetVehicleComponentRotation
- resetVehicleComponentScale
- resetVehicleDummyPositions
- setHeliBladeCollisionsEnabled
- setHelicopterRotorSpeed
- setVehicleAdjustableProperty
- setVehicleComponentPosition
- setVehicleComponentRotation
- setVehicleComponentScale
- setVehicleComponentVisible
- setVehicleDummyPosition
- setVehicleGravity
- setVehicleLandingGearDown
- setVehicleModelDummyPosition
- setVehicleModelExhaustFumesPosition
- setVehicleModelWheelSize
- setVehicleNitroActivated
- setVehicleNitroCount
- setVehicleNitroLevel
- setVehicleWheelScale
- setVehicleWheelStates
- setVehicleWindowOpen
- Shared
- addVehicleUpgrade
- attachTrailerToVehicle
- blowVehicle
- createVehicle
- detachTrailerFromVehicle
- fixVehicle
- getOriginalHandling
- getTrainDirection
- getTrainPosition
- getTrainSpeed
- getTrainTrack
- getVehicleColor
- getVehicleCompatibleUpgrades
- getVehicleController
- getVehicleDoorOpenRatio
- getVehicleDoorState
- getVehicleEngineState
- getVehicleHandling
- getVehicleHeadLightColor
- getVehicleLandingGearDown
- getVehicleLightState
- getVehicleMaxPassengers
- getVehicleModelFromName
- getVehicleName
- getVehicleNameFromModel
- getVehicleOccupant
- getVehicleOccupants
- getVehicleOverrideLights
- getVehiclePaintjob
- getVehiclePanelState
- getVehiclePlateText
- getVehicleSirenParams
- getVehicleSirens
- getVehicleSirensOn
- getVehicleTowedByVehicle
- getVehicleTowingVehicle
- getVehicleTurretPosition
- getVehicleType
- getVehicleUpgradeOnSlot
- getVehicleUpgradeSlotName
- getVehicleUpgrades
- getVehicleVariant
- getVehicleWheelStates
- isTrainDerailable
- isTrainDerailed
- isVehicleBlown
- isVehicleDamageProof
- isVehicleFuelTankExplodable
- isVehicleLocked
- isVehicleOnGround
- isVehicleTaxiLightOn
- removeVehicleUpgrade
- setTrainDerailable
- setTrainDerailed
- setTrainDirection
- setTrainPosition
- setTrainSpeed
- setTrainTrack
- setVehicleColor
- setVehicleDamageProof
- setVehicleDoorOpenRatio
- setVehicleDoorState
- setVehicleDoorsUndamageable
- setVehicleEngineState
- setVehicleFuelTankExplodable
- setVehicleHandling
- setVehicleHeadLightColor
- setVehicleLandingGearDown
- setVehicleLightState
- setVehicleLocked
- setVehicleOverrideLights
- setVehiclePaintjob
- setVehiclePanelState
- setVehiclePlateText
- setVehicleSirens
- setVehicleSirensOn
- setVehicleTaxiLightOn
- setVehicleTurretPosition
- setVehicleVariant
- setVehicleWheelStates