| Home Page | Recent Changes

UnrealScript Entry Points/Actor Events

Tarquin: all the info below has been moved to Actor/Methods. Please do not add more to this page.

Entry Points: Engine.Actor

Here are the known entry points defined for the base Actor class. They may or may not be handled by default in that class, within the engine (C++), or in a derived class.

event AnimEnd()

Notification that the current animation has ended. Allows an object to wait for animation completion before proceeding with other activities.

event KImpact()

// event called when Karmic actor hits with impact velocity over KImpactThreshold)

event KVelDropBelow()

// event called when karma actor's velocity drops below KVelDropBelowThreshold)

event KSkelConvulse()

// event called when a ragdoll convulses (see KarmaParamsSkel)

event KApplyForce

// event called just before sim to allow user to

(hehe, that one was incomplete...)

event bool KUpdateState

// 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.

event Destroyed()

event GainedChild()

event LostChild()

event Tick()

event PostNetReceive()

event Trigger()

event UnTrigger()

event BeginEvent()

event EndEvent()

event Timer()

event HitWall()

event Falling()

event Landed()

event ZoneChange()

ZoneChange() is called upon login, on both the client and server. For a Player Pawn, it is apparently only called on the client, after that, and if you want to know about it on the server, you need to have a simulated? event ZoneChange() in your Player Pawn. Then, both the client and server will be notified, when the Player Pawn changes Zones.

event PhysicsVolumeChange()

event Touch()

event PostTouch()

// called for PendingTouch actor after physics completes

event UnTouch()

event Bump()

event BaseChange()

event Attach()

event Detach()

event SpecialHandling()

event EncroachingOn()

event EncroachedBy()

event FinishedInterpolation()

event EndedRotation()

event UsedBy()

simulated event FellOutOfWorld()

event KilledBy()

event TakeDamage()

event TornOff()

// Networking - called on client when actor is torn off (bTearOff==true)

native simulated event DemoPlaySound ()

event bool PreTeleport()

event PostTeleport()

event BeginPlay()

// Level State

event RenderTexture()

event PreBeginPlay()

// Called immediately before gameplay begins.

event BroadcastLocalizedMessage()

// 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.

event PostBeginPlay()

// Called immediately after gameplay begins.

simulated event SetInitialState()

// Called after PostBeginPlay.

event PostNetBeginPlay()

// called after PostBeginPlay. On a net client, PostNetBeginPlay() is

// spawned after replicated variables have been initialized to their replicated values

event TravelPreAccept()

// Called when carried onto a new level, before AcceptInventory.

event TravelPostAccept()

// Called when carried into a new level, after AcceptInventory.

event TriggerEvent()

// Trigger an event

function UntriggerEvent()

// Untrigger an event

(is this an event? if not, why?)

function RenderOverlays()

//called by player's hud to request drawing of actor specific overlays onto canvas

function BecomeViewTarget()

// Called by PlayerController when this actor becomes its ViewTarget.

Back to Parent

Discussion

Xian:

ZoneChange() is called upon login, on both the client and server. For a Player Pawn, it is apparently only called on the client, after that, and if you want to know about it on the server, you need to have a simulated? event ZoneChange() in your Player Pawn. Then, both the client and server will be notified, when the Player Pawn changes Zones.

Eric what did you mean ? I thought it is called on every change in the zone, not necessarily on login. I mean waterzones, lavazones etc. get updated all the time (especially in PainTimer()). I think it is better if we move it into a discussion first before setting it as info.

EricBlade: The trick is, at least where I'm at, a Pawn's ZoneChange() is not called on the server, unless it is simulated via the client call. The only thing in my entire base code that defined ZoneChange() is in Actor:

simulated event ZoneChange(ZoneInfo NewZone);

Xian: I assume that is because the RemoteRole is Autonomous instead of Simulated. So the 'server-side' is dictated as being client-side (since the controller is autonomous), setting it to a simulated function will make the engine differentiate it better, I assume. Perhaps I didn't explain it best but I hope you got my point :)

But what did you mean with that "called upon login" thing ?

EricBlade:Even if it's not simulated, ZoneChange is run on the server once, when the player pawn is created, with the NewZone being the Zone that the pawn is created in. (this may also happen when respawning, my gametype doesn't do respawning currently, so I didn't get a chance to check with that)

Xian: Think you misinterpreted how the Engine reacts. It is called on EVERY zone change... meaning everytime the pawn changes zones (enters/exits/switches), so when a pawn is created it first checks what zone it interacts with. It will happen on respawn only if the death zone is different from the spawn zone (that seems logical). It's obvious that a simulated function gets run on both server and client, but as I said, my guess is that a non simulated one gets called only on the client cos of its RemoteRole.

Tarquin: Um... this page says it shouldn't be worked on any more.

Comments?

Wormbo: This page should have been named Actor/Methods. Also the package prefix is not neccessary since there's only one Actor class.

Lazarus: Actually no, but I understand the confusion. This is for events only (methods that are called asynchronously by the engine). See my note in [UScript Entry Points]?. I know there's going to be overlap, just not sure the best way to handle it. I'll certainly reorganize it if people have a good suggestion. Understood on the pacakge prefix, I just did it for reference.

The Unreal Engine Documentation Site

Wiki Community

Topic Categories

Recent Changes

Offline Wiki

Unreal Engine

Console Commands

Terminology

FAQs

Help Desk

Mapping Topics

Mapping Lessons

UnrealEd Interface

UnrealScript Topics

UnrealScript Lessons

Making Mods

Class Tree

Modeling Topics

Chongqing Page

Log In