Once I get that upgrade to 36-hour days, I will tackle that. – Mychaeel
UE3:Actor native functions (UT3)
Contents
- 1 Native functions
- 1.1 AttachComponent
- 1.2 AutonomousPhysics
- 1.3 ChartData
- 1.4 ClampRotation
- 1.5 ClearTimer
- 1.6 Clock
- 1.7 ConsoleCommand
- 1.8 ContainsPoint
- 1.9 CreateAudioComponent
- 1.10 Destroy
- 1.11 DetachComponent
- 1.12 FastTrace
- 1.13 FindBase
- 1.14 FindSpot
- 1.15 ForceUpdateComponents
- 1.16 GetBaseMost
- 1.17 GetBoundingCylinder
- 1.18 GetComponentsBoundingBox
- 1.19 GetDestination
- 1.20 GetGravityZ
- 1.21 GetTargetLocation
- 1.22 GetTeamNum
- 1.23 GetTerminalVelocity
- 1.24 GetTimerCount
- 1.25 GetTimerRate
- 1.26 GetURLMap
- 1.27 GetUTFlag
- 1.28 IsBasedOn
- 1.29 IsOverlapping
- 1.30 IsOwnedBy
- 1.31 IsPlayerOwned
- 1.32 IsTimerActive
- 1.33 MakeNoise
- 1.34 Move
- 1.35 MoveSmooth
- 1.36 MovingWhichWay
- 1.37 NativePostRenderFor
- 1.38 PlayerCanSeeMe
- 1.39 PlaySound
- 1.40 PointCheckComponent
- 1.41 SetBase
- 1.42 SetCollision
- 1.43 SetCollisionSize
- 1.44 SetDrawScale
- 1.45 SetDrawScale3D
- 1.46 SetForcedInitialReplicatedProperty
- 1.47 SetHardAttach
- 1.48 SetHidden
- 1.49 SetHUDLocation
- 1.50 SetLocation
- 1.51 SetNetUpdateTime
- 1.52 SetOnlyOwnerSee
- 1.53 SetOwner
- 1.54 SetPhysics
- 1.55 SetRelativeLocation
- 1.56 SetRelativeRotation
- 1.57 SetRotation
- 1.58 SetTickGroup
- 1.59 SetTimer
- 1.60 SetZone
- 1.61 Spawn
- 1.62 SuggestTossVelocity
- 1.63 Trace
- 1.64 TraceComponent
- 1.65 UnClock
- Actor native functions in other games:
- RTNP, U1, UT, U2, U2XMP, UE2Runtime, UT2003, UT2004, UDK
- Other member categories for this class:
- events, instance functions, internal variables, structs
This is an auto-generated page and may need human attention. Please remove the {{autogenerated}} tag if the page seems reasonably complete or replace it with the {{expand}} tag if the page is not yet complete. |
Native functions
AttachComponent
Adds a component to the actor's components array, attaching it to the actor.
Parameters:
- NewComponent - The component to attach.
AutonomousPhysics
ChartData
Draw some value over time onto the StatChart. Toggle on and off with
ClampRotation
Clamps out_Rot between the upper and lower limits offset from the base
ClearTimer
Clears a previously set timer, identical to calling SetTimer() with a <= 0.f rate.
Parameters:
- inTimerFunc - the name of the timer to remove or the default one if not specified
Clock
ConsoleCommand
ContainsPoint
CreateAudioComponent
Destroy
DetachComponent
Removes a component from the actor's components array, detaching it from the actor.
Parameters:
- ExComponent - The component to detach.
FastTrace
FindBase
Attempts to find a valid base for this actor
FindSpot
ForceUpdateComponents
GetBaseMost
Walks up the Base chain from this Actor and returns the Actor at the top (the eventual Base). this->Base is NULL, returns this.
GetBoundingCylinder
GetComponentsBoundingBox
GetDestination
returns the position the AI should move toward to reach this actor accounts for AI using path lanes, cutting corners, and other special adjustments
GetGravityZ
Get gravity currently affecting this actor
GetTargetLocation
Parameters:
- RequestedBy - the Actor requesting the target location
- bRequestAlternateLoc - optional) - return a secondary target location if there are multiple
Returns:
- the optimal location to fire weapons at this actor
GetTeamNum
GetTerminalVelocity
returns terminal velocity (max speed while falling) for this actor. Unless overridden, it returns the TerminalVelocity of the PhysicsVolume in which this actor is located.
GetTimerCount
Gets the current count for the specified timer, defaults to 'Timer' if no function is specified. Returns -1.f if the timer is not currently active.
Parameters:
- inTimerFunc - the name of the timer to remove or the default one if not specified
GetTimerRate
Gets the current rate for the specified timer.
Parameters:
- TimerFuncName - the name of the function to check for a timer for; 'Timer' is the default
Returns:
- the rate for the given timer, or -1.f if that timer is not active
Note: GetTimerRate('SomeTimer') - GetTimerCount('SomeTimer') is the time remaining before 'SomeTimer' is called
GetURLMap
GetUTFlag
IsBasedOn
iterates up the Base chain to see whether or not this Actor is based on the given Actor
Parameters:
- TestActor - the Actor to test for
Returns:
- whether or not this Actor is based on TestActor
IsOverlapping
IsOwnedBy
iterates up the Owner chain to see whether or not this Actor is owned by the given Actor
Parameters:
- TestActor - the Actor to test for
Returns:
- whether or not this Actor is owned by TestActor
IsPlayerOwned
Searches the owner chain looking for a player.
IsTimerActive
Returns true if the specified timer is active, defaults to 'Timer' if no function is specified.
Parameters:
- inTimerFunc - the name of the timer to remove or the default one if not specified
MakeNoise
Move
MoveSmooth
MovingWhichWay
This will return the direction in LocalSpace that that actor is moving. This is useful for firing off effects based on which way the actor is moving. *
NativePostRenderFor
Hook to allow actors to render HUD overlays for themselves. Assumes that appropriate font has already been set
PlayerCanSeeMe
PlaySound
PointCheckComponent
Run a point check against just this PrimitiveComponent. Return TRUE if we hit.
NOTE: the actual Actor we call this on is irrelevant!
SetBase
SetCollision
SetCollisionSize
SetDrawScale
SetDrawScale3D
SetForcedInitialReplicatedProperty
adds/removes a property from a list of properties that will always be replicated when this Actor is bNetInitial, even if the code thinks the client has the same value the server already does This is a workaround to the problem where an LD places an Actor in the level, changes a replicated variable away from the defaults, then at runtime the variable is changed back to the default but it doesn't replicate because initial replication is based on class defaults Only has an effect when called on bStatic or bNoDelete Actors Only properties already in the owning class's replication block may be specified
Parameters:
- PropToReplicate - the property to add or remove to the list
- bAdd - true to add the property, false to remove the property
SetHardAttach
SetHidden
Changes the value of bHidden.
Parameters:
- bNewHidden - The value to assign to bHidden.
SetHUDLocation
function used to update where icon for this actor should be rendered on the HUD
Parameters:
- NewHUDLocation - is a vector whose X and Y components are the X and Y components of this actor's icon's 2D position on the HUD
SetLocation
SetNetUpdateTime
Updates NetUpdateTime to the new value for future net relevancy checks
SetOnlyOwnerSee
changes the value of bOnlyOwnerSee
Parameters:
- bNewOnlyOwnerSee - the new value to assign to bOnlyOwnerSee
SetOwner
SetPhysics
SetRelativeLocation
SetRelativeRotation
SetRotation
SetTickGroup
Changes the ticking group for this actor
SetTimer
Sets a timer to call the given function at a set interval. Defaults to calling the 'Timer' event if no function is specified. If inRate is set to 0.f it will effectively disable the previous timer.
NOTE: Functions with parameters are not supported!
Parameters:
- inRate - the amount of time to pass between firing
- inbLoop - whether to keep firing or only fire once
- inTimerFunc - the name of the function to call when the timer fires
SetZone
updates the zone/PhysicsVolume of this Actor
Parameters:
- bForceRefresh - forces the code to do a full collision check instead of exiting early if the current info is valid
Spawn
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 (if that happens, there will be a log warning indicating why) Defaults to spawning at the spawner's location.
Note: ActorTemplate is sent for replicated actors and therefore its properties will also be applied at initial creation on the client. However, because of this, ActorTemplate must be a static resource (an actor archetype, default object, or a bStatic/bNoDelete actor in a level package) or the spawned Actor cannot be replicated
SuggestTossVelocity
Returns true
if a successful toss from Start
to Destination
was found, and returns the suggested toss velocity in TossVelocity
.
Parameters:
- TossSpeed - the magnitude of the toss
- BaseTossZ - an additional Z direction force added to the toss. (defaults to 0)
- DesiredZPct - the requested pct of the toss in the z direction (0=toss horizontally, 0.5 = toss at 45 degrees, defaults to 0.05). This is the starting point for finding a toss. The purpose of this is to bias the test in cases where there is more than one solution. (Which is usually the case if the target is well within range.)
- CollisionSize - the size of bunding box of the tossed actor (defaults to (0,0,0)
Trace
Trace a line and see what it collides with first. Takes this actor's collision properties into account. Returns first hit actor, Level if hit level, or None if hit nothing.
TraceComponent
Run a line check against just this PrimitiveComponent. Return TRUE if we hit.
NOTE: the actual Actor we call this on is irrelevant!