KVehicle
note 1: The K in KVehicle stands for Karma, and this class is controlled by some native Karma functions
note 2: The KVehicle extends Pawn, and so gets a lot of stuff from Pawn, like Health.
Class Details
- Class Engine.KVehicle
Known subclasses
Properties
- Steering (float)
- If the controller wants to steer, ranges from -1 to 1.
- Throttle (float)
- If the controller wants to throttle, ranges from -1 to 1.
- Driver (Pawn (UT))
- The actual pawn of the controller
- ExitPositions (dynamic array of vectors)
- The exit positions of the vehicle, relative to the vehicle
- DrivePos (vector)
- The position of the driver when the vehicle is driven, relative to the vehicle
- DriveRot (rotator)
- The rotation of the driver when the vehicle is driven, relative to the vehicle
- DestroyEffectClass (class actor)
- The class of the effect that is spawned when the vehicle is destroyed
- bAutoDrive (bool)
- If set to True, the steering is set to 1 and the Throttle to 0.4 when there is no driver
- bGetOut (bool)
- If set to True, the driver wants to get out
- ParentFactory (KVehicleFactory)
- The factory that created the vehicle
- bVehicleIsFiring (bool)
- If is True then the driver wants to fire
- bVehicleIsAltFiring (bool)
- If is True then the driver wants to altfire
- CameraHistory (static array of vectors)
- The histroy of the camera (someone find out what this does!)
- FilterFrames (const, default = 5)
- The lenght of the CameraHistory array
- NextHistorySlot (int)
- The next slot that has to be filled with in the camera history
- bHistoryWarmup (bool)
- The history isn't filled
Functions
- TakeDamage(int Damage, Pawn instigatedBy, Vector hitlocation, Vector momentum, class<DamageType> damageType)
- A simple takedamage function, reduces health and destroyes the vehicle when Health is lower or equal then 0
- VehicleStateReceived()
- An event, called when a new state is received, implented in subclass : (comment says in VehicleState, but KVehicle doesn't have a VehicleState)
- KVehicleUpdateParams()
- Used to update the vehicles Para on all the attached actors (like wheels)
- VehicleFire(bool bWasAltFire)
- Called when the driver starts firing
- VehicleCeaseFire(bool bWasAltFire)
- Called when the driver stops firing
- TryToDrive(Pawn (UT) p)
- Called when someone tries to get in
- ClientKDriverEnter(PlayerController pc)
- Driver enters, called also on clients, mainly sets HUD
- KDriverEnter(Pawn (UT) p)
- Driver enters, sets the controller to the vehicle, and attaches the pawn to the car
- ClientKDriverLeave(PlayerController pc)
- Driver leaves, called also on clients, mainly resets HUD
- KDriverLeave(bool bForceLeave) (Bool)
- Driver leaves, The driver exits at the 1st possible exit pos (not blocked) and the controller is attached to it.
- SpecialCalcView(out actor ViewActor, out vector CameraLocation, out rotator CameraRotation) (Bool)
- When bSpecialCalcView is True, this function is called to set the possition of the camera
Events
- Destroyed()
- Vehicle is destroyed, remove attached stuff, create effect, set factory vehicle count -1 (if any)
- Tick(float deltaSeconds)
- If driver tries to get out, get him out.