Event Equivalents

Hello there, :slight_smile:

I come from an unreal3 unrealscript background, and so I’m a little bit out of touch when it comes to the events available in Unreal5. Some of the C++ functions are pretty straightforward, like BeginPlay, Tick, TakeDamage, and Destroyed. But others are not so obvious – or their implementation changed considerably – and it’s left me a little confused over how to implement and/or use similar functionality in this generation of the engine.

I’m looking for C++ function equivalents of these unrealscript events:

  • encroachedby()
  • encroachedon()
  • bump()
  • touch() / untouch()
  • posttouch()
  • hitwall()
  • raninto()
  • landed()
  • basechanged()
  • rootmotionmodechanged()
  • rootrotationmodechanged()
  • postinitanimtree()
  • animtreeupdated()
  • collisionchanged()
  • SetPhysics()
  • DoJump(bool bUpdating)
  • Falling()
  • Suicide()
  • SetPhysics()
  • RootMotionMode = RMM_Ignore, etc.
  • RootRotationMode = RMRM_Ignore, etc.
  • SetBase() I also see that SetBase now only exists in character.h now? How do non-pawn/character actors and the like set their own base, particularly on other actors that move / interpolate?
  • SetHardAttach() - esp after SetBase()

Kismet:

  • OnToggle(SeqAct_Toggle Action) - essentially using blueprints to toggle an actor ON / OFF.
  • interpolationStarted()
  • InterpolationFinished()

I realize that matinee has been replaced by something called Sequencer? I’m unfamiliar with it atm, but I’m sure there are similar events surrounding when a sequence starts and stops?

Regards.

Giving this thread a bump. And maybe some additional details below can help things along:

The old documentation page for collision is here:
https://docs.unrealengine.com/udk/Three/CollisionTechnicalGuide.html

I’m looking for C++ function equivalents of these unrealscript events:

I use these for when a character is crushed by a ceiling or steps on a bug or something.
encroachedby()
encroachedon()

Didn’t find the above anywhere in UE5 code, so I’m wondering how to do encroach detection in UE5?

bump() - Is this OnTakeHit now?
touch() / untouch() - OnOverlapBegin? OnOverlapEnd?
posttouch() - touch AFTER the physics step completes. Is there an equivalent for this in UE5?

hitwall()
raninto()

collisionchanged() - any time collision flags were changed, this event was called.

I know root motion is still a thing in UE5, but are there equivalent event functions where root motion translation and rotation update like there were in UE3?

rootmotionmodechanged()
rootrotationmodechanged()

In UE3, this used to be set in the actor. But I am having a bit of trouble locating these (or equivalents)? Are there setters for stuff like this in USkeletalMeshComponent, but with different names or something?

RootMotionMode = RMM_Ignore, etc.
RootRotationMode = RMRM_Ignore, etc.

I know things are called AnimBlueprints now, but:

postinitanimtree() - An event called when animtree(s) was first initialized for a pawn (character). So is there an event for when anim blueprints are first initialized?

animtreeupdated() - Any time the animtree updated whichever node(s) were being actively used. Is there an event for whenever a given anim blueprint updates?

SetPhysics() - I am absolutely lost when it comes to the physics system for UE5. I am curious how you might implement walking physics, vs. flying and falling physics, vs custom physics on the C++ side.

DoJump(bool bUpdating) - Pretty self-explanatory. Called when you wanted the player to jump in the air. Typically you modified a Velocity variable directly to do the actual jump in the air.

Falling() - Falling down event without pressing DoJump()

Suicide() - Pawn instant death with no instigator.

SetBase() I also see that SetBase now only exists in character.h now? How do non-pawn/character actors and the like set their own base, particularly on other actors that move / interpolate with Matinee / Sequencer?

SetHardAttach() - esp after SetBase(). If you needed an object to set a base on a pawn (or other actor), you set hardattach to prevent frame lag, at a cost of removing all collision from the actor that called this function. Has SetBase been improved so that you can setbase without lag, and keep collision or something?

Kismet

I know that UnrealKismet is now called the Event Graph. So I’m looking for the equivalent C++ functions for these:

OnToggle(SeqAct_Toggle Action) - for UE4+ essentially using blueprints to toggle an actor ON / OFF.

InterpolationStarted() - Matinee (Sequencer?) started its animation.
InterpolationFinished() - Matinee (Sequencer?) ended its animation.

I realize that matinee has been replaced by something called Sequencer? I’m unfamiliar with it ATM, but I’m sure there are similar events surrounding when a sequence starts and stops?

Thanks for any help anyone can provide! :slight_smile: