There is no spoon

UE3:Vehicle instance functions (UDK)

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
UDK Object >> Actor >> Pawn >> Vehicle (instance functions)
Vehicle instance functions in other games:
U2, UT2004, UT3

Instance functions

AdjustDriverDamage

function AdjustDriverDamage (out int Damage, Controller InstigatedBy, Object.Vector HitLocation, out Object.Vector Momentum, class<DamageTypeDamageType)


AnySeatAvailable

function bool AnySeatAvailable ()

SeatAvailable() returns true if a seat is available for a pawn

AttachDriver

simulated function AttachDriver (Pawn P)

Attach driver to vehicle. Sets up the Pawn to drive the vehicle (rendering, physics, collision..). Called only if bAttachDriver is true. Network : ALL

CanEnterVehicle

function bool CanEnterVehicle (Pawn P)

CanEnterVehicle() return true if Pawn P is allowed to enter this vehicle

CheatFly

function bool CheatFly ()

Overrides: Pawn.CheatFly


CheatGhost

function bool CheatGhost ()

Overrides: Pawn.CheatGhost


CheatWalk

function bool CheatWalk ()

Overrides: Pawn.CheatWalk


CrushedBy

function CrushedBy (Pawn OtherPawn)

Overrides: Pawn.CrushedBy

CrushedBy() Called for pawns that have bCanBeBaseForPawns=false when another pawn becomes based on them

Destroyed_HandleDriver

simulated function Destroyed_HandleDriver ()


DetachDriver

simulated function DetachDriver (Pawn P)

Detach Driver from vehicle. Network : ALL

Died

function bool Died (Controller Killer, class<DamageTypeDamageType, Object.Vector HitLocation)

Overrides: Pawn.Died

(Description copied from Pawn.Died)
This pawn has died.

Parameters:

  • Killer - Who killed this pawn
  • DamageType - What killed it
  • HitLocation - Where did the hit occur

Returns:

true if allowed

DisplayDebug

simulated function DisplayDebug (HUD HUD, out float out_YL, out float out_YPos)

Overrides: Pawn.DisplayDebug

See: Actor::DisplayDebug

DriverDied

function DriverDied (class<DamageTypeDamageType)


DriverEnter

function bool DriverEnter (Pawn P)

DriverEnter() Make Pawn P the new driver of this vehicle Changes controller ownership across pawns

DriverLeft

function DriverLeft ()


DriverRadiusDamage

function DriverRadiusDamage (float DamageAmount, float DamageRadius, Controller EventInstigator, class<DamageTypeDamageType, float Momentum, Object.Vector HitLocation, Actor DamageCauser, optional float DamageFalloffExponent)

DriverRadiusDamage() determine if radius damage that hit the vehicle should damage the driver

DrivingStatusChanged

simulated function DrivingStatusChanged ()


EntryAnnouncement

function EntryAnnouncement (Controller C)


FaceRotation

simulated function FaceRotation (Object.Rotator NewRotation, float DeltaTime)

Overrides: Pawn.FaceRotation

Vehicles ignore 'face rotation'.

FindAutoExit

function bool FindAutoExit (Pawn ExitingDriver)

FindAutoExit(Pawn ExitingDriver) Tries to find exit position on either side of vehicle, in back, or in front returns true if driver successfully exited.

GetCollisionDamageInstigator

function Controller GetCollisionDamageInstigator ()

Returns:

the Controller that should receive credit for damage caused by this vehicle colliding with others

GetDefaultCameraMode

simulated function name GetDefaultCameraMode (PlayerController RequestedBy)

Overrides: Pawn.GetDefaultCameraMode

(Description copied from Pawn.GetDefaultCameraMode)
returns default camera mode when viewing this pawn. Mainly called when controller possesses this pawn.

Parameters:

  • PlayerController - requesting the default camera view

Returns:

default camera view player should use when controlling this pawn.

GetExitRotation

function Object.Rotator GetExitRotation (Controller C)


HandleDeadVehicleDriver

function HandleDeadVehicleDriver ()

handles the driver pawn of the dead vehicle (decide whether to ragdoll it, etc)

NotifyDriverTakeHit

function NotifyDriverTakeHit (Controller InstigatedBy, Object.Vector HitLocation, int Damage, class<DamageTypeDamageType, Object.Vector Momentum)

called when the driver of this vehicle takes damage

NotifyTeamChanged

simulated function NotifyTeamChanged ()

Overrides: Pawn.NotifyTeamChanged

NotifyTeamChanged() Called when PlayerReplicationInfo is replicated to this pawn, or PlayerReplicationInfo team property changes.

Network: client

PancakeOther

function PancakeOther (Pawn Other)

Crush the pawn vehicle is encroaching

PlaceExitingDriver

function bool PlaceExitingDriver (optional Pawn ExitingDriver)

PlaceExitingDriver() Find an acceptable position to place the exiting driver pawn, and move it there. Returns true if pawn was successfully placed.

PlayDying

simulated function PlayDying (class<DamageTypeDamageType, Object.Vector HitLoc)

Overrides: Pawn.PlayDying


PlayerChangedTeam

function PlayerChangedTeam ()

Overrides: Pawn.PlayerChangedTeam


PossessedBy

function PossessedBy (Controller C, bool bVehicleTransition)

Overrides: Pawn.PossessedBy


SetBaseEyeheight

simulated function SetBaseEyeheight ()

Overrides: Pawn.SetBaseEyeheight


SetDriving

simulated function SetDriving (bool b)


SetInputs

simulated function SetInputs (float InForward, float InStrafe, float InUp)


SetKillInstigator

function Controller SetKillInstigator (Controller InstigatedBy, class<DamageTypeDamageType)

Overrides: Pawn.SetKillInstigator


Suicide

function Suicide ()

Overrides: Pawn.Suicide


TakeRadiusDamage

simulated function TakeRadiusDamage (Controller InstigatedBy, float BaseDamage, float DamageRadius, class<DamageTypeDamageType, float Momentum, Object.Vector HurtOrigin, bool bFullDamage, Actor DamageCauser, optional float DamageFalloffExponent)

Overrides: Actor.TakeRadiusDamage

Take Radius Damage by default scales damage based on distance from HurtOrigin to Actor's location. This can be overriden by the actor receiving the damage for special conditions (see KAsset.uc).

Parameters:

  • InstigatedBy - instigator of the damage
  • Base - Damage
  • Damage - Radius (from Origin)
  • DamageType - class
  • Momentum - float)
  • HurtOrigin - origin of the damage radius.
  • DamageCauser - the Actor that directly caused the damage (i.e. the Projectile that exploded, the Weapon that fired, etc)

ThrowActiveWeapon

function ThrowActiveWeapon ()

Overrides: Pawn.ThrowActiveWeapon

(Description copied from Pawn.ThrowActiveWeapon)
Toss active weapon using default settings (location+velocity).

Parameters:

  • DamageType - allows this function to do different behaviors based on the damage type

TryExitPos

function bool TryExitPos (Pawn ExitingDriver, Object.Vector ExitPos, bool bMustFindGround)


TryToDrive

function bool TryToDrive (Pawn P)

TryToDrive() returns true if Pawn P successfully became driver of this vehicle

UnPossessed

function UnPossessed ()

Overrides: Pawn.UnPossessed


ZeroMovementVariables

simulated function ZeroMovementVariables ()

Overrides: Pawn.ZeroMovementVariables