| Home Page | Recent Changes | Preferences

Actor/Methods

UT2003 :: Object >> Actor (Methods)

Uncategorized

string ConsoleCommand( string Command ) [native]
Execute a console command in the context of the current level and game engine. See console commands.
Error( coerce string S ) [native, final]
Handle an error and kill this one actor.
Sleep( float Seconds ) [native, final, latent]
See latent function.

Collision

SetCollision( optional bool NewColActors, optional bool NewBlockActors, optional bool NewBlockPlayers ) [native, final]
bool SetCollisionSize( float NewRadius, float NewHeight ) [native, final]

Drawing

SetDrawScale( float NewScale ) [native, final]
SetDrawScale3D( vector NewScale3D ) [native, final]
SetStaticMesh( StaticMesh NewStaticMesh ) [native, final]
SetDrawType( EDrawType NewDrawType ) [native, final]

Movement

bool Move( vector Delta ) [native, final]
bool SetLocation( vector NewLocation ) [native, final]
bool SetRotation( rotator NewRotation ) [native, final]
bool SetRelativeRotation( rotator NewRotation ) [native, final]
Sets the rotation relative to the actor's base.
bool SetRelativeLocation( vector NewLocation ) [native, final]
bool MoveSmooth( vector Delta ) [native, final]
AutonomousPhysics( float DeltaSeconds ) [native, final]

Relations

SetBase( Actor NewBase, optional vector NewFloor ) [native, final]
SetOwner( Actor NewOwner ) [native, final]

Animation

string GetMeshName() [native, final]
bool PlayAnim( name Sequence, optional float Rate, optional float TweenTime, optional int Channel ) [native, final]
bool LoopAnim( name Sequence, optional float Rate, optional float TweenTime, optional int Channel ) [native, final]
bool TweenAnim( name Sequence, float Time, optional int Channel ) [native, final]
bool IsAnimating(optional int Channel) [native, final]
FinishAnim(optional int Channel) [native, final, latent]
bool HasAnim( name Sequence ) [native, final]
StopAnimating( optional bool ClearAllButBase ) [native, final]
FreezeAnimAt( float Time, optional int Channel) [native, final]
SetAnimFrame( float Time, optional int Channel, optional int UnitFlag ) [native, final]
bool IsTweening(int Channel) [native, final]
AnimStopLooping(optional int Channel) [native, final]

Animation Notifications

AnimEnd( int Channel ) [event]
EnableChannelNotify ( int Channel, int Switch ) [native, final]
int GetNotifyChannel() [native, final]

Skeletal Animation

LinkSkelAnim( MeshAnimation? Anim, optional Mesh NewMesh ) [simulated, native, final]
LinkMesh( Mesh NewMesh, optional bool bKeepAnim ) [simulated, native, final]
BoneRefresh() [native, final]
AnimBlendParams( int Stage, optional float BlendAlpha, optional float InTime, optional float OutTime, optional name BoneName, optional bool bGlobalPose) [native, final]
* udntech logo SkeletalBlending
AnimBlendToAlpha( int Stage, float TargetAlpha, float TimeInterval ) [native, final]
coords GetBoneCoords( name BoneName ) [native, final]
rotator GetBoneRotation( name BoneName, optional int Space ) [native, final]
vector GetRootLocation() [native, final]
rotator GetRootRotation() [native, final]
vector GetRootLocationDelta() [native, final]
rotator GetRootRotationDelta() [native, final]
bool AttachToBone( Actor Attachment, name BoneName ) [native, final]
bool DetachFromBone( Actor Attachment ) [native, final]
LockRootMotion( int Lock ) [native, final]
SetBoneScale( int Slot, optional float BoneScale, optional name BoneName ) [native, final]
SetBoneDirection( name BoneName, rotator BoneTurn, optional vector BoneTrans, optional float Alpha, optional int Space ) [native, final]
SetBoneLocation( name BoneName, optional vector BoneTrans, optional float Alpha ) [native, final]
SetBoneRotation( name BoneName, optional rotator BoneTurn, optional int Space, optional float Alpha ) [native, final, simulated]
GetAnimParams( int Channel, out name OutSeqName, out float OutAnimFrame, out float OutAnimRate ) [native, final]
bool AnimIsInGroup( int Channel, name GroupName ) [native, final]
Name GetClosestBone( Vector loc, Vector ray, out float boneDist, optional Name BiasBone, optional float BiasDistance ) [native, final]
UpdateURL( String NewOption, String NewValue, bool bSaveDefault ) [native, final]
string GetUrlOption( String Option ) [native, final]

Rendering

plane GetRenderBoundingSphere() [native, final]
DrawDebugLine( vector LineStart, vector LineEnd, byte R, byte G, byte B) [native, final]
SLOW! Use for debugging only!

Physics

DebugClock() [native, final]
DebugUnclock() [native, final]
FinishInterpolation() [native, final, latent]
SetPhysics( EPhysics newPhysics ) [native, final]
OnlyAffectPawns( bool B ) [native, final]

Karma

Note that SimParams take affect until you quit the game! Make sure you reset them to defaults when leaving your mod etc.

KGetSimParams( out KSimParams SimParams ) [native, final]
KSetSimParams( KSimParams SimParams ) [native, final]
quat KGetRBQuaternion() [native, final]
KGetRigidBodyState( out KRigidBodyState RBstate ) [native, final]
KDrawRigidBodyState( KRigidBodyState RBState, bool AltColour ) [native, final]
SLOW! Use for debugging only!
vector KRBVecToVector( KRBVec RBvec ) [native, final]
KRBVec KRBVecFromVector( vector v ) [native, final]
KSetMass( float mass ) [native, final]
float KGetMass() [native, final]
KSetInertiaTensor( vector it1, vector it2 ) [native, final]
Set inertia tensor assuming a mass of 1. Scaled by mass internally to calculate actual inertia tensor.
KGetInertiaTensor( out vector it1, out vector it2 ) [native, final]
KSetDampingProps( float lindamp, float angdamp ) [native, final]
KGetDampingProps( out float lindamp, out float angdamp ) [native, final]
KSetFriction( float friction ) [native, final]
float KGetFriction() [native, final]
KSetRestitution( float rest ) [native, final]
float KGetRestitution() [native, final]
KSetCOMOffset( vector offset ) [native, final]
KGetCOMOffset( out vector offset ) [native, final]
KGetCOMPosition( out vector pos ) [native, final]
Get actual position of actors COM in world space.
KSetImpactThreshold( float thresh ) [native, final]
float KGetImpactThreshold() [native, final]
KWake() [native, final]
bool KIsAwake() [native, final]
KAddImpulse( vector Impulse, vector Position, optional name BoneName ) [native, final]
KSetStayUpright( bool stayUpright, bool allowRotate ) [native, final]
KSetBlockKarma( bool newBlock ) [native, final]
KSetActorGravScale( float ActorGravScale ) [native, final]
float KGetActorGravScale() [native, final]
KDisableCollision( Actor Other ) [native, final]
Disable Karma contact generation between this actor, and another actor. Collision is on by default.
KEnableCollision( Actor Other ) [native, final]
Enable Karma contact generation between this actor, and another actor. Collision is on by default.

Karma Ragdoll

KSetSkelVel( vector Velocity, optional vector AngVelocity, optional bool AddToCurrent ) [native, final]
float KGetSkelMass() [native, final]
KFreezeRagdoll() [native, final]
KAddBoneLifter( name BoneName, InterpCurve LiftVel, float LateralFriction, InterpCurve Softness ) [native, final]
Note you MUST turn collision off (KSetBlockKarma) before using bone lifters!
KRemoveLifterFromBone( name BoneName ) [native, final]
KRemoveAllBoneLifters() [native, final]
Used for only allowing a fixed maximum number of ragdolls in action.
KMakeRagdollAvailable() [native, final]
bool KIsRagdollAvailable() [native, final]
KImpact( Actor other, vector pos, vector impactVel, vector impactNorm) [event]
called when Karmic actor hits with impact velocity over KImpactThreshold
KVelDropBelow() [event]
called when karma actor's velocity drops below KVelDropBelowThreshold
KSkelConvulse() [event]
called when a ragdoll convulses (see KarmaParamsSkel)
KApplyForce( out vector Force, out vector Torque ) [event]
called just before sim to allow user to ????. you should ONLY put numbers into Force and Torque during this event!!!!
bool KUpdateState(out KRigidBodyState newState) [event]
This is called from inside C++ physKarma at the appropriate time to update state of Karma rigid body. If you return true, newState will be set into the rigid body. Return false and it will do nothing.

Timing

Clock( out float time ) [native, final]
This is called at the beginning of a section of code to be timed. The variable time does not need to be initialized. See Optimization Techniques for a code sample.
UnClock( out float time ) [native, final]
This is called at the end of a section of code to be timed passing in the same time variable supplied to Clock. See Optimization Techniques for a code sample.
CyclesToSeconds( int cycles) [native, final]
Available for Deus Ex. Converts the cycles created by Clock/UnClock to seconds.

Music

int PlayMusic( string Song, float FadeInTime ) [native, final]
StopMusic( int SongHandle, float FadeOutTime ) [native, final]
StopAllMusic( float FadeOutTime ) [native, final]

Engine notification functions

Destroyed() [event]
GainedChild( Actor Other ) [event]
LostChild( Actor Other ) [event]
Tick( float DeltaTime ) [event]
PostNetReceive() [event]

Triggers

Trigger( Actor Other, Pawn EventInstigator ) [event]
UnTrigger( Actor Other, Pawn EventInstigator ) [event]
BeginEvent() [event]
EndEvent() [event]

Physics & world interaction

Timer() [event]
HitWall( vector HitNormal, Actor HitWall ) [event]
Falling() [event]
Landed( vector HitNormal ) [event]
ZoneChange( ZoneInfo NewZone ) [event]
PhysicsVolumeChange( PhysicsVolume NewVolume ) [event]
Touch( Actor Other ) [event]
PostTouch( Actor Other ) [event]
called for PendingTouch actor after physics completes
UnTouch( Actor Other ) [event]
Bump( Actor Other ) [event]
BaseChange() [event]
Attach( Actor Other ) [event]
Detach( Actor Other ) [event]
Actor SpecialHandling( Pawn Other) [event]
bool EncroachingOn( Actor Other ) [event]
EncroachedBy( Actor Other ) [event]
FinishedInterpolation() [event]
The implementation in actor only sets bInterpolating to false.
EndedRotation() [event]
Called when rotation completes.
UsedBy( Pawn user ) [event]
Called if this Actor was touching a Pawn who pressed Use.
FellOutOfWorld( eKillZType KillType ) [simulated, event]
Sets physics to none and destroys the actor.

Damage & Kills

KilledBy( Pawn EventInstigator ) [event]
TakeDamage( int Damage, Pawn EventInstigator, vector HitLocation, vector Momentum, class<DamageType> DamageType ) [event]
Actor Trace( out vector HitLocation, out vector HitNormal, vector TraceEnd, optional vector TraceStart, optional bool bTraceActors, optional vector Extent, optional out Material Material ) [native, final]
This traces a path to find what it collides with first. The line will be traced starting at TraceStart and ending at TraceEnd. If bTraceActors is true, actors will be considered for the tracing, otherwise only pieces of the world (terrain, staticmeshactors, BSP) will be considered for collision. When the trace hits something, HitLocation and HitNormal will be set to contain the location and normal of the impact. If specified, the material of the surface hit can also be returned. If an Extent is specified, you can have the trace have "width." It will have a box of the size specified as a vector (corner to corner) as the "thickness" of the trace. Note that traces are not very fast, so should be avoided or kept to a minimum where possible. Note that if you want actors to be considered for traces they must be able to block the trace, either by bCollideActors, or easier with bBlockZeroExtentTraces or bBlockNonZeroExtentTraces if your trace uses extents. See Trace? for more.

Foxpaw: Can someone elaborate on the extents of a trace? Specifically, is the box aligned on the world axes or along the trace? IE, does the X of the extents point "foreward" along the trace, with Y and Z perpindicular to the trace, or do they define a box in the world coordinate system that gets "dragged along" the length of the trace?

Foxpaw: Tracing doesn't seem to interact properly with terrain if you use extents. I have been able to get zero extent traces to hit terrain, but not extent traces.

bool FastTrace( vector TraceEnd, optional vector TraceStart ) [native, final]
Similar to trace, this one returns true if it hits the world geometry, false if it is not long enough. It will pass right through anything that is not set as world geometry.
Actor Spawn( class<Actor> SpawnClass, optional Actor SpawnOwner, optional name SpawnTag, optional vector SpawnLocation, optional rotator SpawnRotation ) [native, final]
Spawn an actor. Returns an actor of the specified class, not of class Actor (this is hardcoded in the compiler). Returns None if the actor could not be spawned (either the actor wouldn't fit in the specified location, or the actor list is full). Defaults to spawning at the spawner's location.
bool Destroy() [native, final]
Destroy this actor. Returns true if destroyed, false if indestructable. Destruction is latent. It occurs at the end of the tick.
TornOff() [event]
Networking - called on client when actor is torn off (bTearOff==true)

Timing

SetTimer( float NewTimerRate, bool bLoop ) [native, final]
Causes Timer() events every NewTimerRate seconds.

Sound

PlaySound( Sound Sound, optional ESoundSlot Slot, optional float Volume, optional bool bNoOverride, optional float Radius, optional float Pitch, optional bool Attenuate ) [native, final]
Play a sound effect.
PlayOwnedSound( Sound Sound, optional ESoundSlot Slot, optional float Volume, optional bool bNoOverride, optional float Radius, optional float Pitch, optional bool Attenuate ) [native, simulated, final]
Play a sound effect, but don't propagate to a remote owner (he is playing the sound clientside).
DemoPlaySound( Sound Sound, optional ESoundSlot Slot, optional float Volume, optional bool bNoOverride, optional float Radius, optional float Pitch, optional bool Attenuate ) [native, simulated, event]
float GetSoundDuration( Sound Sound ) [native, final]
Get a sound duration in seconds.

Force Feedback

PlayFeedbackEffect( String EffectName ) [native, final]
StopFeedbackEffect( optional String EffectName ) [native, final]
Pass no parameter or "" to stop all.
bool ForceFeedbackSupported( optional bool Enable ) [native, final]

AI

MakeNoise( float Loudness ) [native, final]
Inform other creatures that you've made a noise they might hear (they are sent a HearNoise message). Senders of MakeNoise should have an instigator if they are not pawns. The noise is blocked by walls (only tested BSP, not SM)

Foxpaw: This probrably does a "FastTrace" and will be blocked by any object that is set as being world geometry. I haven't tested that either though.

bool PlayerCanSeeMe() [native, final]
Returns true if any player (server) or the local player (standalone or client) has a line of sight to actor's location.
vector SuggestFallVelocity( vector Destination, vector Start, float MaxZ, float MaxXYSpeed ) [native, final]

???

bool PreTeleport( Teleporter InTeleporter ) [event]
PostTeleport( Teleporter OutTeleporter ) [event]
BeginPlay() [event]

Disk access

string GetMapName( string NameEnding, string MapName, int Dir ) [native, final]
GetNextSkin( string Prefix, string CurrentSkin, int Dir, out string SkinName, out string SkinDesc ) [native, final]
string GetURLMap() [native, final]
string GetNextInt( string ClassName, int Num ) [native, final]
GetNextIntDesc( string ClassName, int Num, out string Entry, out string Description ) [native, final]
bool GetCacheEntry( int Num, out string GUID, out string Filename ) [native, final]
bool MoveCacheEntry( string GUID, optional string NewFilename ) [native, final]

Iterator functions

Iterator functions for dealing with sets of actors.

AllActors( class<Actor> BaseClass, out Actor Actor, optional name MatchTag ) [native, final, iterator]
Avoid using AllActors() too often as it iterates through the whole actor list and is therefore slow.
DynamicActors( class<Actor> BaseClass, out Actor Actor, optional name MatchTag ) [native, final, iterator]
Only iterates through the non-static actors on the list (still relatively slow, but much better than AllActors). This should be used in most cases and replaces AllActors in most of Epic's game code.
ChildActors( class<Actor> BaseClass, out Actor Actor ) [native, final, iterator]
Returns all actors owned by this actor. Slow like AllActors().
BasedActors( class<Actor> BaseClass, out Actor Actor ) [native, final, iterator]
Returns all actors based on the current actor (slow, like AllActors).
TouchingActors( class<Actor> BaseClass, out Actor Actor ) [native, final, iterator]
Returns all actors touching the current actor (fast).
TraceActors( class<Actor> BaseClass, out Actor Actor, out vector HitLoc, out vector HitNorm, vector End, optional vector Start, optional vector Extent ) [native, final, iterator]
TraceActors() return all actors along a traced line. Reasonably fast (like any trace).
RadiusActors( class<Actor> BaseClass, out Actor Actor, float Radius, optional vector Loc ) [native, final, iterator]
Returns all actors within a give radius. Slow like AllActors(). Use CollidingActors() or VisibleCollidingActors() instead if desired actor types are visible (not bHidden) and in the collision hash (bCollideActors is true).
VisibleActors( class<Actor> BaseClass, out Actor Actor, optional float Radius, optional vector Loc ) [native, final, iterator]
Returns all visible actors within a radius. Slow like AllActors(). Use VisibleCollidingActors() instead if desired actor types are in the collision hash (bCollideActors is true).
VisibleCollidingActors( class<Actor> BaseClass, out Actor Actor, float Radius, optional vector Loc, optional bool bIgnoreHidden ) [native, final, iterator]
VisibleCollidingActors() returns visible (not bHidden) colliding (bCollideActors==true) actors within a certain radius. Much faster than AllActors() since it uses the collision hash.
CollidingActors( class<Actor> BaseClass, out Actor Actor, float Radius, optional vector Loc ) [native, final, iterator]
Returns colliding (bCollideActors==true) actors within a certain radius. Much faster than AllActors() for reasonably small radii since it uses the collision hash.

Scripted Actor functions

BecomeViewTarget()
Called by PlayerController when this actor becomes its ViewTarget.
BroadcastLocalizedMessage( class<LocalMessage> MessageClass, optional int Switch, optional PlayerReplicationInfo RelatedPRI_1, optional PlayerReplicationInfo RelatedPRI_2, optional Object OptionalObject ) [event]
Broadcast a localized message to all players. Most message deal with 0 to 2 related PRIs. The LocalMessage class defines how the PRI's and optional actor are used.
DisplayDebug( Canvas Canvas, out float YL, out float YPos ) [simulated]
lists important actor variable on canvas. HUD will call DisplayDebug() on the current ViewTarget when the ShowDebug exec is used.
HurtRadius( float DamageAmount, float DamageRadius, class<DamageType> DamageType, float Momentum, vector HitLocation ) [simulated, final]
Hurt locally authoritative actors within the radius.
MatchStarting()
Called when gameplay actually starts.
PlayTeleportEffect( bool bOut, bool bSound )
PostBeginPlay() [event]
Called immediately after gameplay begins. See Chain of Events at Level Startup.
PostNetBeginPlay() [event]
called after PostBeginPlay. On a net client, PostNetBeginPlay() is spawned after replicated variables have been initialized to their replicated values. See Chain of Events at Level Startup.
PreBeginPlay() [event]
Called immediately before gameplay begins. See Chain of Events at Level Startup.
RenderOverlays( Canvas Canvas )
Called by player's hud to request drawing of actor specific overlays onto canvas.
RenderTexture( ScriptedTexture Tex ) [event]
ReplaceText( out string Text, string Replace, string With ) [final]
Reset()
Reset actor to initial state - used when restarting level without reloading.
SetDefaultDisplayProperties()
SetDisplayProperties( ERenderStyle NewStyle, Material NewTexture, bool bLighting )
Set the display properties of an actor. By setting them through this function, it allows the actor to modify other components (such as a Pawn's weapon) or to adjust the result based on other factors (such as a Pawn's other inventory wanting to affect the result).
SetGRI( GameReplicationInfo GRI )
SetInitialState() [simulated, event]
Called after PostBeginPlay.
SetOverlayMaterial( Material mat, float time, bool bOverride ) [simulated]
StartInterpolation() [simulated]
when this function is called, the actor will start moving along an interpolation path beginning at Dest.
String GetHumanReadableName() [simulated]
Returns the human readable string representation of an object.
String GetItemName( string FullName )
Returns the string representation of the name of an object without the package prefixes.
String GetLocalString( optional int Switch, optional PlayerReplicationInfo RelatedPRI_1, optional PlayerReplicationInfo RelatedPRI_2 ) [static]
Get localized message string associated with this actor.
TravelPostAccept() [event]
Called when carried into a new level, after AcceptInventory.
TravelPreAccept() [event]
Called when carried onto a new level, before AcceptInventory.
TriggerEvent( Name EventName, Actor Other, Pawn EventInstigator ) [event]
Trigger an event
UntriggerEvent( Name EventName, Actor Other, Pawn EventInstigator )
Untrigger an event
UpdatePrecacheMaterials() [simulated]
UpdatePrecacheStaticMeshes() [simulated]
bool CanSplash()
bool EffectIsRelevant( vector SpawnLocation, bool bForceDedicated ) [simulated]
bool IsInPain()
bool IsInVolume( Volume aVolume )
bool NearSpot(vector Spot) [simulated, final]
returns true is spot is within collision cylinder.
bool TouchingActor( Actor A ) [simulated, final]
string GetDebugName()
vector GetCollisionExtent()

MythOpus: Do you think we could add some documentation on how to get these functions to work?

MythOpus: Since there are various functions only available for certain games on this page, I suggest we page different pages for each seperate game for methods.

Tarquin: Good idea

MythOpus: Thanks :)

Related Topics


Category To Do : Still needs work... lots to document, the functions need to be better orginized into groups, and then it can all be broken up into sub-pages by group. Some initial groups... rendering, movement, collision, physics, etc.

The Unreal Engine Documentation Site

Wiki Community

Topic Categories

Image Uploads

Random Page

Recent Changes

Offline Wiki

Unreal Engine

Console Commands

Terminology

Mapping Topics

Mapping Lessons

UnrealEd Interface

Questions&Answers

Scripting Topics

Scripting Lessons

Making Mods

Class Tree

Questions&Answers

Modeling Topics

Questions&Answers

Log In