The three virtues of a programmer: Laziness, Impatience, and Hubris. – Larry Wall

UE3:GameSpecialMove (UDK)

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
UDK Object >> GameSpecialMove
Package: 
GameFramework


Properties

bForcePrecisePosition

Type: bool

PrecisePosition will not be enforced on non-owning instance unless this flag is set

bLastCanDoSpecialMove

Type: bool

Modifiers: private

Can we do the current special move?

bReachedPreciseDestination

Type: bool

Modifiers: const

Flag set when Pawn reached precise location

bReachedPreciseRotation

Type: bool

Modifiers: const

Flag set when pawn reached precise rotation

bReachPreciseDestination

Type: bool

Modifiers: const

Flag used when moving Pawn to a precise location

bReachPreciseRotation

Type: bool

Modifiers: const

Flag used when rotating pawn to a precise rotation

Handle

Type: name

Named handle of this special move

LastCanDoSpecialMoveTime

Type: float

Modifiers: transient

Last time CanDoSpecialMove was called.

PawnOwner

Type: GamePawn

Owner of this special move

PreciseDestBase

Type: Actor

Modifiers: const


PreciseDestination

Type: Object.Vector

Modifiers: const

World location to reach

PreciseDestRelOffset

Type: Object.Vector

Modifiers: const


PreciseRotation

Type: Object.Rotator

Modifiers: const

World rotation to face

PreciseRotationInterpolationTime

Type: float

Modifiers: const

Time to interpolate Pawn's rotation

Functions

Native functions

ForcePawnRotation

final native function ForcePawnRotation (Pawn P, Object.Rotator NewRotation)

Forces Pawn's rotation to a given Rotator

RelativeToWorldOffset

native final function Object.Vector RelativeToWorldOffset (Object.Rotator InRotation, Object.Vector RelativeSpaceOffset) const


ResetFacePreciseRotation

native final function ResetFacePreciseRotation ()

Reset FacePreciseRotation related vars Otherwise, these vars will be carried over to next action vars are const in script - so need native interface

SetFacePreciseRotation

native final function SetFacePreciseRotation (Object.Rotator RotationToFace, float InterpolationTime)

Force Pawn to face a specific rotation.

Parameters:

  • RotationToFace - Rotation for Pawn to face.
  • InterpolationTime - Time it takes for Pawn to face given rotation.

SetReachPreciseDestination

native final function SetReachPreciseDestination (Object.Vector DestinationToReach, optional bool bCancel)

Send Pawn to reach a precise destination. ReachedPrecisePosition() event will be called when Pawn reaches destination. This tries to get the Pawn as close as possible from DestinationToReach in 2D space (so Z is ignored). This doesn't use the path network, so PawnOwner should be already fairly close to destination. A TimeOut should be used to prevent the Pawn from being stuck.

Parameters:

  • DestinationToReach - point in world space to reach. (Z ignored).
  • bCancel - if TRUE, this will cancel any current PreciseDestination movement.

WorldToRelativeOffset

native final function Object.Vector WorldToRelativeOffset (Object.Rotator InRotation, Object.Vector WorldSpaceOffset) const

Turn a World Space location into an Actor Space relative location.

Events

ReachedPrecisePosition

event ReachedPrecisePosition ()

Event sent when Pawn has reached precise position. PreciseRotation or PreciseLocation, or Both. When both Rotation and Location are set, the event is fired just once, after the Pawn has reached both.

Other instance functions

CanChainMove

function bool CanChainMove (name NextMove)

Can the special move be chained after the current one finishes?

CanDoSpecialMove

final function bool CanDoSpecialMove (optional bool bForceCheck)

Public accessor to see if this special move can be done, handles caching the results for a single frame.

Parameters:

  • bForceCheck - Allows you to skip the single frame condition (which will be incorrect on clients since LastCanDoSpecialMoveTime isn't replicated)

CanOverrideMoveWith

function bool CanOverrideMoveWith (name NewMove)

Can a new special move override this one before it is finished? This is only if CanDoSpecialMove() == TRUE && !bForce when starting it.

CanOverrideSpecialMove

function bool CanOverrideSpecialMove (name InMove)

Can this special move override InMove if it is currently playing?

InitSpecialMove

function InitSpecialMove (GamePawn InPawn, name InHandle)


InternalCanDoSpecialMove

protected function bool InternalCanDoSpecialMove ()

Checks to see if this Special Move can be done.

MessageEvent

function bool MessageEvent (name EventName, Object Sender)

Generic function to send message events to SpecialMoves. Returns TRUE if message has been processed correctly.

ShouldReplicate

function bool ShouldReplicate ()

Should this special move be replicated to non-owning clients?

SpecialMoveEnded

function SpecialMoveEnded (name PrevMove, name NextMove)

Event called when Special Move is finished.

SpecialMoveFlagsUpdated

function SpecialMoveFlagsUpdated ()

called when DoSpecialMove() is called again with this special move, but the special move flags have changed

SpecialMoveStarted

function SpecialMoveStarted (bool bForced, name PrevMove)

Event called when Special Move is started.

Tick

function Tick (float DeltaTime)

Script Tick function.