|
Arma Reforger Script API
|
Public Member Functions | |
| proto external float | GetSpeedKmh () |
| Returns current vehicle speed in km/h (kilometers per hour). | |
| proto external void | ForceEnableSimulation () |
| Forcibly enables simulation of vehicle, only meant for cinematics, not to be used in any game logic! | |
| proto external void | GetInputs (out float steer, out float throttle) |
| Returns current steering and throttle inputs. | |
| proto external void | SetInputs (float steer, float throttle) |
| Sets steering and throttle inputs. | |
| proto external float | GetClutch () |
| Returns current clutch value in range < 0, 1 > 0 . | |
| proto external void | SetClutch (float in) |
| Sets the clutch input. | |
| proto external float | GetBrake () |
| Returns current brake input in range < 0, 1 > | |
| proto external void | SetBreak (float in, bool hb) |
| Sets brake inputs. | |
| proto external float | GetThrottle () |
| returns current throttle input in range < 0, 1 > | |
| proto external void | SetThrottle (float in) |
| Sets throttle input. | |
| proto external int | GetGear () |
| Returns index of currently engaged gear. | |
| proto external void | SetGear (int in) |
| Switches to given gear. | |
| proto external bool | IsHandbrakeOn () |
| Returns whether handbrake is currently applied. | |
| proto external void | EngineStart () |
| Starts the engine. | |
| proto external void | EngineStop () |
| Stops the engine. | |
| proto external bool | EngineIsOn () |
| Returns true if engine is running. | |
| proto external float | EngineGetRPMIdle () |
| Returns idle rpm of the engine. | |
| proto external float | EngineGetRPMPeakTorque () |
| Returns rpm at which engine provides maximal torque. | |
| proto external float | EngineGetRPMPeakPower () |
| Returns rpm at which engine provides maximal power. | |
| proto external float | EngineGetRPMMax () |
| Returns maximal working rpm before engine explodes. | |
| proto external float | EngineGetRPM () |
| Returns current engine's RPM. | |
| proto external float | EngineGetRPMFeedback () |
| Returns RPM that is feeded back from rest of the powertrain. | |
| proto external float | EngineGetLoad () |
| Returns current engine load in range < 0, 1 > | |
| proto external float | EngineGetPeakTorque () |
| Returns initial engine's peak torque in Nm (newton-metre). | |
| proto external float | EngineGetPeakTorqueState () |
| Returns current engine's peak torque in Nm (newton-metre). | |
| proto external void | EngineSetPeakTorqueState (float peakTorque) |
| Sets current engine's peak torque. | |
| proto external float | EngineGetPeakPower () |
| Returns initial engine's peak power in kW (kilowatts). | |
| proto external float | EngineGetPeakPowerState () |
| Returns current engine's peak power in kW (kilowatts). | |
| proto external void | EngineSetPeakPowerState (float peakPower) |
| Sets current engine's peak power. | |
| proto external float | GearboxGetEfficiency () |
| Returns initial gearbox efficiency. | |
| proto external float | GearboxGetEfficiencyState () |
| Returns current gearbox efficiency. | |
| proto external void | GearboxSetEfficiencyState (float efficiency) |
| Sets current gearbox efficiency. | |
| proto external int | GearboxGearsCount () |
| Returns number of all gear ratios (neutral included). | |
| proto external int | GearboxForwardGearsCount () |
| Returns number of forward gears. | |
| proto external int | TrackCount () |
| Returns number of tracks. | |
| proto external int | WheelCount () |
| Returns number of wheels. | |
| proto external vector | WheelGetPosition (int trackIdx, int wheelIdx, float displacement=0.0) |
| Get the wheel position based on suspension. | |
| proto external bool | WheelHasContact (int trackIdx, int wheelIdx) |
| Returns true if wheel has contact with ground or other object. | |
| proto external GameMaterial | WheelGetContactMaterial (int trackIdx, int wheelIdx) |
| Returns wheel contact material. | |
| proto external vector | WheelGetContactPosition (int trackIdx, int wheelIdx) |
| Returns wheel contact position in world space. | |
| proto external vector | WheelGetContactNormal (int trackIdx, int wheelIdx) |
| Returns wheel contact normal. | |
| proto external IEntity | WheelGetContactEntity (int trackIdx, int wheelIdx) |
| Returns entity which is in contact with wheel. | |
| proto external EWheelContactLiquidState | WheelGetContactLiquidState (int trackIdx, int wheelIdx) |
| Returns whether and how is wheel in contact with some liquid. | |
| proto external GameMaterial | WheelGetContactLiquidMaterial (int trackIdx, int wheelIdx) |
| Returns the material of the liquid which the wheel is in contact. | |
| proto external vector | WheelGetContactLiquidPosition (int trackIdx, int wheelIdx) |
| Returns the position where the wheel touches a liquid surface. | |
| proto external float | WheelGetRPM (int trackIdx, int wheelIdx) |
| Returns current wheel's RPM. | |
| proto external float | WheelGetRadius (int trackIdx, int wheelIdx) |
| Returns initial wheel's radius. | |
| proto external float | WheelGetRollingDrag (int trackIdx, int wheelIdx) |
| Returns current wheel's rolling drag percentage. | |
| proto external void | WheelSetRollingDrag (int trackIdx, int wheelIdx, float drag) |
| Sets current rolling drag percentage. | |
Public Member Functions inherited from VehicleBaseSimulation | |
| proto external bool | HasAnyGroundContact () |
| Returns true if any wheel/landing gear has contact with ground or other object. | |
| proto external vector | GetGForce () |
| Returns the acceleration of the vehicle produced by mechanical forces. | |
| proto external float | GetGForceMagnitude () |
| Returns the total amount of acceleration of the vehicle produced by mechanical forces. | |
| proto external bool | IsValid () |
| Returns true if this component was properly initialized. | |
Public Member Functions inherited from GameComponent | |
| bool | OnTicksOnRemoteProxy () |
Additional Inherited Members | |
Static Public Member Functions inherited from VehicleBaseSimulation | |
| static proto void | SetSurfaceOverride (ResourceName surfaceMat) |
| Internal use only! Overrides surface material of wheel/track casts. | |
Protected Member Functions inherited from VehicleBaseSimulation | |
| void | OnInit (IEntity owner) |
| Called during EOnInit. | |
| proto external float VehicleTrackedSimulation.EngineGetLoad | ( | ) |
Returns current engine load in range < 0, 1 >
| proto external float VehicleTrackedSimulation.EngineGetPeakPower | ( | ) |
Returns initial engine's peak power in kW (kilowatts).
| proto external float VehicleTrackedSimulation.EngineGetPeakPowerState | ( | ) |
Returns current engine's peak power in kW (kilowatts).
| proto external float VehicleTrackedSimulation.EngineGetPeakTorque | ( | ) |
Returns initial engine's peak torque in Nm (newton-metre).
| proto external float VehicleTrackedSimulation.EngineGetPeakTorqueState | ( | ) |
Returns current engine's peak torque in Nm (newton-metre).
| proto external float VehicleTrackedSimulation.EngineGetRPM | ( | ) |
Returns current engine's RPM.
| proto external float VehicleTrackedSimulation.EngineGetRPMFeedback | ( | ) |
Returns RPM that is feeded back from rest of the powertrain.
| proto external float VehicleTrackedSimulation.EngineGetRPMIdle | ( | ) |
Returns idle rpm of the engine.
| proto external float VehicleTrackedSimulation.EngineGetRPMMax | ( | ) |
Returns maximal working rpm before engine explodes.
| proto external float VehicleTrackedSimulation.EngineGetRPMPeakPower | ( | ) |
Returns rpm at which engine provides maximal power.
| proto external float VehicleTrackedSimulation.EngineGetRPMPeakTorque | ( | ) |
Returns rpm at which engine provides maximal torque.
| proto external bool VehicleTrackedSimulation.EngineIsOn | ( | ) |
Returns true if engine is running.
| proto external void VehicleTrackedSimulation.EngineSetPeakPowerState | ( | float | peakPower | ) |
Sets current engine's peak power.
| peakTorque | must be in kW (kilowatts). |
| proto external void VehicleTrackedSimulation.EngineSetPeakTorqueState | ( | float | peakTorque | ) |
Sets current engine's peak torque.
| peakTorque | must be in Nm (newton-metre). |
| proto external void VehicleTrackedSimulation.EngineStart | ( | ) |
Starts the engine.
| proto external void VehicleTrackedSimulation.EngineStop | ( | ) |
Stops the engine.
| proto external void VehicleTrackedSimulation.ForceEnableSimulation | ( | ) |
Forcibly enables simulation of vehicle, only meant for cinematics, not to be used in any game logic!
| proto external int VehicleTrackedSimulation.GearboxForwardGearsCount | ( | ) |
Returns number of forward gears.
| proto external int VehicleTrackedSimulation.GearboxGearsCount | ( | ) |
Returns number of all gear ratios (neutral included).
| proto external float VehicleTrackedSimulation.GearboxGetEfficiency | ( | ) |
Returns initial gearbox efficiency.
| proto external float VehicleTrackedSimulation.GearboxGetEfficiencyState | ( | ) |
Returns current gearbox efficiency.
| proto external void VehicleTrackedSimulation.GearboxSetEfficiencyState | ( | float | efficiency | ) |
Sets current gearbox efficiency.
| proto external float VehicleTrackedSimulation.GetBrake | ( | ) |
Returns current brake input in range < 0, 1 >
| proto external float VehicleTrackedSimulation.GetClutch | ( | ) |
Returns current clutch value in range < 0, 1 > 0 .
. clutch disengaged 1 .. clutch fully engaged
| proto external int VehicleTrackedSimulation.GetGear | ( | ) |
Returns index of currently engaged gear.
| proto external void VehicleTrackedSimulation.GetInputs | ( | out float | steer, |
| out float | throttle ) |
Returns current steering and throttle inputs.
| proto external float VehicleTrackedSimulation.GetSpeedKmh | ( | ) |
Returns current vehicle speed in km/h (kilometers per hour).
| proto external float VehicleTrackedSimulation.GetThrottle | ( | ) |
returns current throttle input in range < 0, 1 >
| proto external bool VehicleTrackedSimulation.IsHandbrakeOn | ( | ) |
Returns whether handbrake is currently applied.
| proto external void VehicleTrackedSimulation.SetBreak | ( | float | in, |
| bool | hb ) |
Sets brake inputs.
| in | should be in range < 0, 1 > |
| hb | indicating whether handbrake should be applied |
| proto external void VehicleTrackedSimulation.SetClutch | ( | float | in | ) |
Sets the clutch input.
| in | should be in range < 0, 1 > |
| proto external void VehicleTrackedSimulation.SetGear | ( | int | in | ) |
Switches to given gear.
| proto external void VehicleTrackedSimulation.SetInputs | ( | float | steer, |
| float | throttle ) |
Sets steering and throttle inputs.
| steer | should be in range < -1, 1 > |
| throttle | should be in range < 0, 1 > |
| proto external void VehicleTrackedSimulation.SetThrottle | ( | float | in | ) |
Sets throttle input.
| in | should be in range < 0, 1 > |
| proto external int VehicleTrackedSimulation.TrackCount | ( | ) |
Returns number of tracks.
| proto external int VehicleTrackedSimulation.WheelCount | ( | ) |
Returns number of wheels.
| proto external IEntity VehicleTrackedSimulation.WheelGetContactEntity | ( | int | trackIdx, |
| int | wheelIdx ) |
Returns entity which is in contact with wheel.
| proto external GameMaterial VehicleTrackedSimulation.WheelGetContactLiquidMaterial | ( | int | trackIdx, |
| int | wheelIdx ) |
Returns the material of the liquid which the wheel is in contact.
| proto external vector VehicleTrackedSimulation.WheelGetContactLiquidPosition | ( | int | trackIdx, |
| int | wheelIdx ) |
Returns the position where the wheel touches a liquid surface.
| proto external EWheelContactLiquidState VehicleTrackedSimulation.WheelGetContactLiquidState | ( | int | trackIdx, |
| int | wheelIdx ) |
Returns whether and how is wheel in contact with some liquid.
| proto external GameMaterial VehicleTrackedSimulation.WheelGetContactMaterial | ( | int | trackIdx, |
| int | wheelIdx ) |
Returns wheel contact material.
| proto external vector VehicleTrackedSimulation.WheelGetContactNormal | ( | int | trackIdx, |
| int | wheelIdx ) |
Returns wheel contact normal.
| proto external vector VehicleTrackedSimulation.WheelGetContactPosition | ( | int | trackIdx, |
| int | wheelIdx ) |
Returns wheel contact position in world space.
| proto external vector VehicleTrackedSimulation.WheelGetPosition | ( | int | trackIdx, |
| int | wheelIdx, | ||
| float | displacement = 0.0 ) |
Get the wheel position based on suspension.
| wheelIdx | Index of the wheel |
| displacement | 0 means the position of the wheel when the suspension is fully extended ( zero g ). |
| proto external float VehicleTrackedSimulation.WheelGetRadius | ( | int | trackIdx, |
| int | wheelIdx ) |
Returns initial wheel's radius.
| proto external float VehicleTrackedSimulation.WheelGetRollingDrag | ( | int | trackIdx, |
| int | wheelIdx ) |
Returns current wheel's rolling drag percentage.
| proto external float VehicleTrackedSimulation.WheelGetRPM | ( | int | trackIdx, |
| int | wheelIdx ) |
Returns current wheel's RPM.
| proto external bool VehicleTrackedSimulation.WheelHasContact | ( | int | trackIdx, |
| int | wheelIdx ) |
Returns true if wheel has contact with ground or other object.
| proto external void VehicleTrackedSimulation.WheelSetRollingDrag | ( | int | trackIdx, |
| int | wheelIdx, | ||
| float | drag ) |
Sets current rolling drag percentage.