Once I get that upgrade to 36-hour days, I will tackle that. – Mychaeel

Legacy:UnrealScript Entry Points/Actor Events

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search

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

Entry Points: Engine.Actor[edit]

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()[edit]

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

event KImpact()[edit]

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

event KVelDropBelow()[edit]

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

event KSkelConvulse()[edit]

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

event KApplyForce[edit]

// event called just before sim to allow user to

(hehe, that one was incomplete...)

event bool KUpdateState[edit]

// 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()[edit]

event GainedChild()[edit]

event LostChild()[edit]

event Tick()[edit]

event PostNetReceive()[edit]

event Trigger()[edit]

event UnTrigger()[edit]

event BeginEvent()[edit]

event EndEvent()[edit]

event Timer()[edit]

event HitWall()[edit]

event Falling()[edit]

event Landed()[edit]

event ZoneChange()[edit]

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()[edit]

event Touch()[edit]

event PostTouch()[edit]

// called for PendingTouch actor after physics completes

event UnTouch()[edit]

event Bump()[edit]

event BaseChange()[edit]

event Attach()[edit]

event Detach()[edit]

event SpecialHandling()[edit]

event EncroachingOn()[edit]

event EncroachedBy()[edit]

event FinishedInterpolation()[edit]

event EndedRotation()[edit]

event UsedBy()[edit]

simulated event FellOutOfWorld()[edit]

event KilledBy()[edit]

event TakeDamage()[edit]

event TornOff()[edit]

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

native simulated event DemoPlaySound ()[edit]

event bool PreTeleport()[edit]

event PostTeleport()[edit]

event BeginPlay()[edit]

// Level State

event RenderTexture()[edit]

event PreBeginPlay()[edit]

// Called immediately before gameplay begins.

event BroadcastLocalizedMessage()[edit]

// 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()[edit]

// Called immediately after gameplay begins.

simulated event SetInitialState()[edit]

// Called after PostBeginPlay.

event PostNetBeginPlay()[edit]

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

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

event TravelPreAccept()[edit]

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

event TravelPostAccept()[edit]

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

event TriggerEvent()[edit]

// Trigger an event

function UntriggerEvent()[edit]

// Untrigger an event

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

function RenderOverlays()[edit]

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

function BecomeViewTarget()[edit]

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

Back to Parent[edit]



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.


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.