ScriptBind_Vehicle

GetVehicle

Gets the vehicle identifier.

Vehicle.GetVehicle()

Reset

Resets the vehicle.

Vehicle.Reset()

IsInsideRadius

Checks if the vehicle is inside the specified radius.

Vehicle.IsInsideRadius( pos, radius )

MultiplyWithWorldTM

Multiplies with the world transformation matrix.

Vehicle.MultiplyWithWorldTM( pos )
ParameterDescription
posPosition vector.

ResetSlotGeometry

Vehicle.ResetSlotGeometry( slot, filename, geometry )

AddSeat

Adds a seat to the vehicle.

Vehicle.AddSeat( paramsTable )
ParameterDescription
paramsTableSeat parameters.

HasHelper

Checks if the vehicle has the specified helper.

Vehicle.HasHelper(name)
ParameterDescription
nameHelper name.

GetHelperPos

Gets the helper position.

Vehicle.GetHelperPos(name, isInVehicleSpace)
ParameterDescription
nameHelper name.
isInVehicleSpace.

GetHelperDir

Gets the helper direction.

Vehicle.GetHelperDir( name, isInVehicleSpace )
ParameterDescription
nameHelper name.
isInVehicleSpace.

GetHelperWorldPos

Gets the helper position in the world coordinates.

Vehicle.GetHelperWorldPos( name )
ParameterDescription
nameHelper name.

EnableMovement

Enables/disables the movement of the vehicle.

Vehicle.EnableMovement( enable )
ParameterDescription
enableTrue to enable movement, false to disable.

DisableEngine

Disables/enables the engine of the vehicle.

Vehicle.DisableEngine( disable )
ParameterDescription
disableTrue to disable the engine, false to enable.

OnHit

Event that occurs after the vehicle is hit.

Vehicle.OnHit( targetId, shooterId, damage, position, radius, pHitClass, explosion )
ParameterDescription
targetIdTarget identifier.
shooterIdShooter identifier.
damageDamage amount.
radiusRadius of the hit.
hitTypeIdHit type.
explosionTrue if the hit cause an explosion, false otherwise.

ProcessPassengerDamage

Processes passenger damages.

Vehicle.ProcessPassengerDamage( passengerId, actorHealth, damage, pDamageClass, explosion )
ParameterDescription
passengerIdPassenger identifier.
actorHealthActor health amount.
damageDamage amount.
hitTypeIdDamage type.
explosionTrue if there is an explosion, false otherwise.

Destroy

Destroys the vehicle.

Vehicle.Destroy()

IsDestroyed

Checks if the vehicle is destroyed.

Vehicle.IsDestroyed()

IsUsable

Checks if the vehicle is usable by the user.

Vehicle.IsUsable( userHandle )
ParameterDescription
userHandleUser identifier.

OnUsed

Events that occurs when the user uses the vehicle.

Vehicle.OnUsed( userHandle, index )
ParameterDescription
userHandleUser identifier.
indexSeat identifier.

EnterVehicle

Makes the actor entering the vehicle.

Vehicle.EnterVehicle( actorHandle, seatId, isAnimationEnabled )
ParameterDescription
actorHandleActor identifier.
seatIdSeat identifier.

ChangeSeat

Makes the actor changing the seat inside the vehicle.

Vehicle.ChangeSeat(actorHandle, seatId, isAnimationEnabled)
ParameterDescription
actorHandleActor identifier.
seatIdSeat identifier.

ExitVehicle

Makes the actor going out from the vehicle.

Vehicle.ExitVehicle( actorHandle )
ParameterDescription
actorHandleActor identifier.

GetComponentDamageRatio

Gets the damage ratio of the specified component.

Vehicle.GetComponentDamageRatio( componentName )

GetSeatForPassenger

Vehicle.GetSeatForPassenger(id)
Returns: Vehicle seat id for the specified passenger.
ParameterDescription
idpassenger id.

OnSpawnComplete

Callback into game code for OnSpawnComplete.

Vehicle.OnSpawnComplete()