Legacy:KVehicle

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to navigation Jump to search
UT2004 :: Actor >> Pawn >> Vehicle >> KVehicle (Package: Engine)

The K in KVehicle stands for Karma, and this class is controlled by some native Karma functions. The KVehicle extends Vehicle, which extends Pawn, and so gets a lot of stuff from Pawn, like Health.

See KVehicle (UT2003) for the UT2003 version of this class.

See SVehicle for the base class of vehicles used in UT2004.

Constants

FilterFrames = 5 
The length of the CameraHistory array. (see Other Properties below)

Properties

KVehicle Group

bool bAutoDrive 
If set to True, the steering is set to 1 and the Throttle to 0.4 when there is no driver
class<Actor> DestroyEffectClass 
The class of the effect that is spawned when the vehicle is destroyed

Other Properties

bool bHistoryWarmup 
The history isn't filled
bool bVehicleIsFiring 
If is True then the driver wants to fire
bool bVehicleIsAltFiring 
If is True then the driver wants to altfire
vector CameraHistory[FilterFrames
Keeps track of the last few camera look-at positions in order to smooth them in SpecialCalcView.
int NextHistorySlot 
The next slot that has to be filled with in the camera history

Methods

Inherited From Actor

Destroyed() (simulated) 
Vehicle is destroyed, remove attached stuff, create effect, set factory vehicle count -1 (if any)
TakeDamage( int Damage, Pawn instigatedBy, vector hitlocation, vector momentum, class<DamageType> damageType ) 
Only calls super class implementation.
Tick( float deltaSeconds ) (simulated) 
Overridden with no code.

Inherited From Pawn

bool SpecialCalcView( out Actor ViewActor, out vector CameraLocation, out rotator CameraRotation ) (simulated) 
When bSpecialCalcView is True, this function is called to set the position of the camera. Uses CameraHistory to smooth look-at position over a few frames.

Inherited From Vehicle

ClientKDriverEnter( PlayerController PC ) (simulated, replicated to client) 
Driver enters, called also on clients, mainly sets HUD
ClientKDriverLeave( PlayerController PC ) (simulated, replicated to client) 
Driver leaves, called also on clients, mainly resets HUD
KDriverEnter( Pawn P ) 
Driver enters, sets the controller to the vehicle, and attaches the pawn to the car
bool KDriverLeave( bool bForceLeave ) 
Driver leaves, The driver exits at the 1st possible exit pos (not blocked) and the controller is attached to it.
TryToDrive( Pawn P ) 
Called when someone tries to get in

New Functions

GraphData( string DataName, float DataValue ) (native, final) 
"Useful function for plotting data to real-time graph on screen."
KVehicleUpdateParams() (simulated) 
Used to update the vehicles Para on all the attached actors (like wheels)
VehicleStateReceived() 
An event, called when a new state is received, implemented in subclass : (comment says in VehicleState, but KVehicle doesn't have a VehicleState (Given that this is an event called from native code, and the superclass of KVehicle has nativereplication, it seems likely that VehicleState is a native struct.))

Known Subclasses

Related Topics