I don't need to test my programs. I have an error-correcting modem.

UE3:Actor (UDK)

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

Contents

Package: 
Engine
Known classes within Actor:
NavigationHandle
Direct subclasses:
Brush, Camera, CameraActor, Controller, CrowdAgent, CrowdAgentBase, CrowdAttractor, CrowdReplicationActor, DecalActorBase, DecalManager, DroppedPickup, DynamicSMActor, Emitter, EmitterPool, FluidInfluenceActor, FluidSurfaceActor, FracturedStaticMeshActor, FractureManager, GameCrowdInteractionPoint, GameCrowdReplicationActor, GameExplosionActor, HUD, Info, Inventory, InventoryManager, KAsset, Keypoint, LensFlareSource, Light, MaterialInstanceActor, MatineeActor, NavigationPoint, NavMeshObstacle, Note, NxForceField, ParticleEventManager, Pawn, PhysAnimTestActor, PhysXDestructiblePart, PrefabInstance, Projectile, PylonSeed, RadialBlurActor, RigidBodyBase, SceneCaptureActor, SkeletalMeshActor, SpeedTreeActor, SplineActor, StaticMeshActorBase, StaticMeshActorBasedOnExtremeContent, Trigger, UTAvoidMarker, UTCarriedObject, UTGib, UTJumpBootEffect, UTLinkBeamLight, UTVehicleBoostPad, UTWeaponAttachment, UTWeaponShield, VehicleMovementEffect, GameCrowdPopulationManager
This class in other games:
RTNP, U1, UT, U2, U2XMP, UE2Runtime, UT2003, UT2004, UT3

Actor: The base class of all actors. Actor is the base class of all gameplay objects. A large number of properties, behaviors and interfaces are implemented in Actor, including:

- Display - Animation - Physics and world interaction - Making sounds - Networking properties - Actor creation and destruction - Actor iterator functions - Message broadcasting

Constants[edit]

List of extra trace flags:

TRACEFLAG_Bullet[edit]

Value: 1


TRACEFLAG_PhysicsVolumes[edit]

Value: 2

Return if a PhysicsVolume is hit.

TRACEFLAG_SkipMovers[edit]

Value: 4

Skip all Movers.

TRACEFLAG_Blocking[edit]

Value: 8


REP_RBLOCATION_ERROR_TOLERANCE_SQ[edit]

Value: 16.0f

when bReplicateRigidBodyLocation is true, the root body of a ragdoll will be replicated but this is not entirely accurate (and isn't meant to be) as the other bodies in the ragdoll may interfere this can then result in jittering from the client constantly trying to apply the replicated value so if the client's error is less than this amount from the replicated value, it will be ignored.

MINFLOORZ[edit]

Value: 0.7

Minimum z value for floor normal (if less, not a walkable floor).

ACTORMAXSTEPHEIGHT[edit]

Value: 35.0

Max height floor walking actor can step up to.

RBSTATE_LINVELSCALE[edit]

Value: 10.0


RBSTATE_ANGVELSCALE[edit]

Value: 1000.0


RB_None[edit]

Value: 0x00

Not set, empty.

RB_NeedsUpdate[edit]

Value: 0x01

If bNewData & RB_NeedsUpdate != 0 then an update is needed.

RB_Sleeping[edit]

Value: 0x02

if bNewData & RB_Sleeping != 0 then this RigidBody needs to sleep.

Properties[edit]

Property group 'Advanced'[edit]

bConsiderAllStaticMeshComponentsForStreaming[edit]

Type: bool

If true, texture streaming code iterates over all StaticMeshComponents found on this actor when building texture streaming information.

bEdShouldSnap[edit]

Type: bool

Snap to grid in editor.

bHiddenEd[edit]

Type: bool

Modifiers: const

Is hidden within the editor at its startup.

bHiddenEdGroup[edit]

Type: bool

Modifiers: const

Is hidden by the group browser.

bLockLocation[edit]

Type: bool

Prevent the actor from being moved in the editor.

TickFrequencyAtEndDistance[edit]

Type: float

When the actor is TickFrequencyDecreaseDistanceEnd from the player, tick at this frequency (in seconds, bigger is less frequent ticks). If this is 0, no decrease in frequency will occur.

Property group 'Attachment'[edit]

Base[edit]

Type: Actor

Modifiers: const

Actor we're standing on.

BaseBoneName[edit]

Type: name


BaseSkelComponent[edit]

Type: SkeletalMeshComponent


bHardAttach[edit]

Type: bool

Modifiers: const


bIgnoreBaseRotation[edit]

Type: bool


bShadowParented[edit]

Type: bool

If TRUE, BaseSkelComponent is used as the shadow parent for this actor.

Property group 'Collision'[edit]

bCanStepUpOn[edit]

Type: bool

If TRUE, PHYS_Walking will attempt to step up onto this object when it hits it.

Default value: True

bCollideComplex[edit]

Type: bool

Ignore Simple Collision on Static Meshes, and collide per Poly.

BlockRigidBody[edit]

Type: bool

Modifiers: const, transient

mirrored copy of CollisionComponent's BlockRigidBody for the Actor property window for LDs (so it's next to CollisionType) purely for editing convenience and not used at all by the physics code.

bNoEncroachCheck[edit]

Type: bool

For encroachers, don't do the overlap check when they move. You will not get touch events for this actor moving, but it is much faster. So if you want touch events from volumes or triggers you need to set this to be FALSE. This is an optimisation for large numbers of PHYS_RigidBody actors for example.

bPathColliding[edit]

Type: bool

this actor should collide (if bWorldGeometry && bBlockActors is true) during path building (ignored if bStatic is true, as actor will always collide during path building).

bPhysRigidBodyOutOfWorldCheck[edit]

Type: bool

If true, do a zero-extent trace each frame from old to new Location when in PHYS_RigidBody. If it hits the world (ie might be tunneling), call FellOutOfWorld.

CollisionComponent[edit]

Type: PrimitiveComponent

Modifiers: editconst


CollisionType[edit]

Type: ECollisionType

Modifiers: const, transient

enum for LDs to select collision options - sets Actor flags and that of our CollisionComponent via PostEditChange().

Default value: COLLIDE_NoCollision

Property group 'Debug'[edit]

bDebug[edit]

Type: bool


Property group 'Display'[edit]

bHidden[edit]

Type: bool

Modifiers: const

If this is True, all PrimitiveComponents of the actor are hidden. If this is false, only PrimitiveComponents with HiddenGame=True are hidden.

DrawScale[edit]

Type: float

Modifiers: const, interp

Scaling factor, 1.0=normal size.

Default value: 1.0

DrawScale3D[edit]

Type: Object.Vector

Modifiers: const, interp

Scaling vector, (1.0,1.0,1.0)=normal size.

Default value:

Member Value
X 1.0
Y 1.0
Z 1.0

PrePivot[edit]

Type: Object.Vector

Modifiers: const

Offset from box center for drawing.

Property group 'Movement'[edit]

Location[edit]

Type: Object.Vector

Modifiers: const

Actor's location; use Move or SetLocation to change.

Physics[edit]

Type: EPhysics

Modifiers: const


Rotation[edit]

Type: Object.Rotator

Modifiers: const

The actor's rotation; use SetRotation to change.

RotationRate[edit]

Type: Object.Rotator

Change in rotation per second.

Property group 'Navigation'[edit]

bBlocksNavigation[edit]

Type: bool

indicates that this Actor can dynamically block AI paths.

Property group 'Object'[edit]

Group[edit]

Type: name


Tag[edit]

Type: name

Actor's tag name.

Property group 'Physics'[edit]

bAllowFluidSurfaceInteraction[edit]

Type: bool

Whether this actor will interact with fluid surfaces or not.

Default value: True

Internal variables[edit]

See Actor internal variables.

Enums[edit]

See Actor enums.

Structs[edit]

See Actor structs.

Functions[edit]

Static native functions[edit]

BP2Vect[edit]

native static final function Object.Vector BP2Vect (BasedPosition BP) const

This will take the BasedPosition passed and return a Vector for it.

DrawDebugBox[edit]

native static final function DrawDebugBox (Object.Vector Center, Object.Vector Extent, byte R, byte G, byte B, optional bool bPersistentLines) const

Draw a debug box.

Note: This is slow. Use for debugging only.

DrawDebugCone[edit]

native static final function DrawDebugCone (Object.Vector Origin, Object.Vector Direction, float Length, float AngleWidth, float AngleHeight, int NumSides, Object.Color DrawColor, optional bool bPersistentLines) const

Draw a debug cone.

Note: This is slow. Use for debugging only.

DrawDebugCoordinateSystem[edit]

native static final function DrawDebugCoordinateSystem (Object.Vector AxisLoc, Object.Rotator AxisRot, float Scale, optional bool bPersistentLines) const

Draw Debug coordinate system.

Note: This is slow. Use for debugging only.

DrawDebugCylinder[edit]

native static final function DrawDebugCylinder (Object.Vector Start, Object.Vector End, float Radius, int Segments, byte R, byte G, byte B, optional bool bPersistentLines) const

Draw a debug cylinder.

Note: This is slow. Use for debugging only.

DrawDebugLine[edit]

native static final function DrawDebugLine (Object.Vector LineStart, Object.Vector LineEnd, byte R, byte G, byte B, optional bool bPersistentLines) const

Draw a debug line.

Note: This is slow. Use for debugging only.

DrawDebugPoint[edit]

native static final function DrawDebugPoint (Object.Vector Position, float Size, Object.LinearColor PointColor, optional bool bPersistentLines) const

Draw a debug point.

Note: This is slow. Use for debugging only.

DrawDebugSphere[edit]

native static final function DrawDebugSphere (Object.Vector Center, float Radius, int Segments, byte R, byte G, byte B, optional bool bPersistentLines) const

Draw a debug sphere.

Note: This is slow. Use for debugging only.

DrawDebugStar[edit]

native static final function DrawDebugStar (Object.Vector Position, float Size, byte R, byte G, byte B, optional bool bPersistentLines) const

Draw a debug box.

Note: This is slow. Use for debugging only.

DrawDebugString[edit]

native static final function DrawDebugString (Object.Vector TextLocation, coerce string Text, optional Actor TestBaseActor, optional Object.Color TextColor, optional float Duration) const

Draw Debug string in the world.

Note: This is slow. Use for debugging only.

Parameters:

  • TextLocation - location the string should be drawn (NOTE: if base actor is non-null this will be treated as an offset from that actor)
  • Text - text to draw
  • TestBaseActor - optional) - actor the string should be attached to (none if it should be static)
  • Color - optional) - the color of the text to draw
  • Duration - optional) - the duration the text should stick around; defauls to forever

FlushDebugStrings[edit]

native static final function FlushDebugStrings () const

Clear all debug strings.

FlushPersistentDebugLines[edit]

native static final function FlushPersistentDebugLines () const

Flush persistent lines.

GetBasedPosition[edit]

native static final function Object.Vector GetBasedPosition (BasedPosition BP) const

This will take the BasedPosition passed and return a Vector for it.

GetPackageGuid[edit]

native static final function Object.Guid GetPackageGuid (name PackageName)

Looks up the GUID of a package on disk. The package must NOT be in the autodownload cache. This may require loading the header of the package in question and is therefore slow.

SetBasedPosition[edit]

native static final function SetBasedPosition (out BasedPosition BP, Object.Vector Pos, optional Actor ForcedBase) const

This will calculate and then set the passed in BasedPosition. This is just modifying the passed in BasedPosition.

Vect2BP[edit]

native static final function Vect2BP (out BasedPosition BP, Object.Vector Pos, optional Actor ForcedBase) const

This will calculate and then set the passed in BasedPosition. This is just modifying the passed in BasedPosition.

Other static functions[edit]

GetLocalString[edit]

static function string GetLocalString (optional int Switch, optional PlayerReplicationInfo RelatedPRI_1, optional PlayerReplicationInfo RelatedPRI_2)


ReplaceText[edit]

static function ReplaceText (out string Text, string Replace, string With)


Iterator functions[edit]

AllActors[edit]

native(304) final iterator function AllActors (class<ActorBaseClass, out Actor Actor, optional class<InterfaceInterfaceClass)

Iterates over all actors in the world, returning all that subclass the specified base class and optionally implement the specified interface.

Note: This is slow. Use one of the more specific iterators whenever possible.

AllOwnedComponents[edit]

native final iterator function AllOwnedComponents (class<ComponentBaseClass, out ActorComponent OutComponent)

Iterates over all components directly or indirectly attached to this actor.

Parameters:

  • BaseClass - Only components deriving from BaseClass will be iterated upon.
  • OutComponent - The iteration variable.

BasedActors[edit]

native(306) final iterator function BasedActors (class<ActorBaseClass, out Actor Actor)

Iterates over all actors Attached to this actor, that subclass the specified base class. (very fast)

ChildActors[edit]

native(305) final iterator function ChildActors (class<ActorBaseClass, out Actor Actor)

Iterates over this actor's Children, that subclass the specified base class. (very fast)

CollidingActors[edit]

native(321) final iterator function CollidingActors (class<ActorBaseClass, out Actor Actor, float Radius, optional Object.Vector Loc, optional bool bUseOverlapCheck, optional class<InterfaceInterfaceClass)

Iterates over all colliding actors (bCollideActors) within the specified radius around the specified location, that subclass the specified base class and optionally implement the specified interface. The location defaults to the calling actor's location, for example:

foreach someActor.CollidingActors(class'X', X, 100) {
  // colliding X within 100 UU radius of someActor
}

If the overlap check is used, actors are picked if their collision overlaps the specified radius, otherwise the actor's location must be within the radius.

Note: This iterator uses the collision hash to find actors. That means, for smaller radii it is much faster than AllActors().

ComponentList[edit]

native final iterator function ComponentList (class<ActorComponentBaseClass, out ActorComponent out_Component)

Iterates over this actor's Components, returning those that subclass the specified base class.

DynamicActors[edit]

native(313) final iterator function DynamicActors (class<ActorBaseClass, out Actor Actor, optional class<InterfaceInterfaceClass)

Iterates over all non-static actors in the world, returning all that subclass the specified base class.

Note: This is somewhat faster than AllActors because it skips the static actors. But while it only starts at the first non-static actor, it usually still is slower than many other iterators because it needs to iterate over the entire remaining actors list.

LocalPlayerControllers[edit]

native final iterator function LocalPlayerControllers (class<PlayerControllerBaseClass, out PlayerController PC)

Iterates over all local PlayerControllers subclassing the specified base class. (very fast)

Typically there is one local PlayerController on each client and listen server and in offline play, but in splitscreen mode there is one PlayerController for each screen. There are no local PlayerControllers on a dedicated server. On servers there may be many PlayerControllers that are no local PlayerControllers. Those will not be returned by this iterator.

OverlappingActors[edit]

native final iterator function OverlappingActors (class<ActorBaseClass, out Actor out_Actor, float Radius, optional Object.Vector Loc, optional bool bIgnoreHidden)

Returns colliding actor (bCollideActors==true) which overlap a sphere from location 'Loc' and 'Radius' radius. Like CollidingActors this uses the collision hash so it is fast for smaller radii.

Parameters:

  • BaseClass - The Actor returns must be a subclass of this.
  • out_Actor - returned Actor at each iteration.
  • Radius - Radius of sphere for overlapping check.
  • Loc - Center of sphere for overlapping check. (Optional, caller's location is used otherwise).
  • bIgnoreHidden - if true, ignore bHidden actors.

TouchingActors[edit]

native(307) final iterator function TouchingActors (class<ActorBaseClass, out Actor Actor)

Iterates over all Touching actors subclassing the specified base class.

TraceActors[edit]

native(309) final iterator function TraceActors (class<ActorBaseClass, out Actor Actor, out Object.Vector HitLoc, out Object.Vector HitNorm, Object.Vector End, optional Object.Vector Start, optional Object.Vector Extent, optional out TraceHitInfo HitInfo, optional int ExtraTraceFlags)

Performs a trace and iterates over all actors on the checked line. The actors are ordered by distance of their hit location.

VisibleActors[edit]

native(311) final iterator function VisibleActors (class<ActorBaseClass, out Actor Actor, optional float Radius, optional Object.Vector Loc)

Iterates over all non-hidden actors visible from the specified location, that subclass the specified base class and optionally are located within a certain radius.

Note: This is extremely slow as it iterates the entire actor list and additionally performs a trace on every actor from the list that matches class and radius requirements.

VisibleCollidingActors[edit]

native(312) final iterator function VisibleCollidingActors (class<ActorBaseClass, out Actor Actor, float Radius, optional Object.Vector Loc, optional bool bIgnoreHidden, optional Object.Vector Extent, optional bool bTraceActors, optional class<InterfaceInterfaceClass)

Iterates over all colliding actors (bCollideActors) within the specified radius around the specified location, that subclass the specified base class, are visible from the location and optionally implement the specified interface.

Parameters:

  • BaseClass - Only actors subclassing this class are returned.
  • Actor - The actors are returned through this variable.
  • Radius - Only actors that are located within this radius are returned.
  • Loc - The center from which to check. Defaults to the calling actor's location.
  • bIgnoreHidden - If true, bHidden actors are skipped.
  • Extent - Zero vector to perform a line check, non-zero vector to perform a "thick" trace. Traces are always performed from Loc to the location of the actor.
  • bTraceActors - Whether trace for other actors as well, not just for world geometry. Enabling this option makes the check a bit more expensive.
  • InterfaceClass - If specified, only actors implementing this interface are returned.

Latent functions[edit]

FinishAnim[edit]

native(261) final latent function FinishAnim (AnimNodeSequence SeqNode)

Returns when the animation in the specified node sequence has finished.

Sleep[edit]

native(256) final latent function Sleep (float Seconds)

Returns after the specified amount of game time has passed.

Native functions[edit]

See Actor native functions.

Events[edit]

See Actor events.

Other instance functions[edit]

See Actor instance functions.