I'm a doctor, not a mechanic

Legacy:KVehicle (UT2003)

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

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

See KVehicle for the UT2004 version of this class.

Constants[edit]

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

Properties[edit]

KVehicle Group[edit]

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
vector DrivePos 
The position of the driver when the vehicle is driven, relative to the vehicle
rotator DriveRot 
The rotation of the driver when the vehicle is driven, relative to the vehicle
array<vector> ExitPositions 
The exit positions of the vehicle, relative to the vehicle
float Steering 
If the controller wants to steer, ranges from -1 to 1.
float Throttle 
If the controller wants to throttle, ranges from -1 to 1.

Other Properties[edit]

bool bGetOut 
If set to True, the driver wants to get out
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
The histroy of the camera (someone find out what this does!)
Pawn Driver 
The actual pawn of the controller
int NextHistorySlot 
The next slot that has to be filled with in the camera history
KVehicleFactory ParentFactory 
The factory that created the vehicle

Methods[edit]

Inherited From Actor[edit]

Destroyed ( ) [simulated] 
Vehicle is destroyed, remove attached stuff, create effect, set factory vehicle count -1 (if any)
EncroachedBy (Actor Other) 
Overridden with no code so vehicle doesn't get telefragged.
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
Tick (float deltaSeconds) [simulated] 
If driver tries to get out, get him out.

Inherited From Pawn[edit]

bool SpecialCalcView (out Actor ViewActor, out vector CameraLocation, out rotator CameraRotation) [simulated] 
When bSpecialCalcView is True, this function is called to set the possition of the camera

New Functions[edit]

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
GraphData (string DataName, float DataValue) [native, final] 
"Useful function for plotting data to real-time graph on screen."
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.
KVehicleUpdateParams ( ) [simulated] 
Used to update the vehicles Para on all the attached actors (like wheels)
TryToDrive (Pawn p) 
Called when someone tries to get in
VehicleCeaseFire (bool bWasAltFire) [replicated to server] 
Called when the driver stops firing
VehicleFire (bool bWasAltFire) [replicated to server] 
Called when the driver starts firing
VehicleStateReceived ( ) 
An event, called when a new state is received, implemented in subclass : (comment says in VehicleState, but KVehicle doesn't have a VehicleState)

Known Subclasses[edit]

Related Topics[edit]