Need help triggering dispatcher

Hey guys, Im trying my best to learn about Event Dispatchers, but Im probably still not getting it.
I have a Trigger box that when overlaped will call that the Wave started. When this happens I must raise the walls of the Arena. What am I doing wrong?
Any help is appreciated :heart:

Looks OK. Is WaveTrigger_BP really the parent actor of the WallBP? Maybe put a print string on the CastFailed pin and see if it’s failing there.

As addition to 's, also make sure that cast to FirstPersonCharacter doesn’t fail, as well as ensuring that OnComponentBeginOverlap does getting triggered in the first place.

Hmmm probably it isnt indeed. Does my trigger have to be a component in the wall actor, or can I do it separately?
The intention is to make the trigger activate 4 walls, so Im not sure how parenting would work

You don’t need to use parenting or delegates. You just need the trigger actor to have references to the walls so it can tell them to open/close. One way is to have your GameMode connect them up so the trigger knows who the walls are. One thing you have to be careful of, tho, is the order of operations.

If you are a beginner we should start you off the easiest way. You can learn better ways later. For this to work, the walls/triggers must be placed in the level from the editor (not spawned at runtime).

You can call FindAllActorsOfClass from the GameMode and use the results to give the trigger the wall references. FindAllActors is slow so it should be avoided – and there are usually better ways – but as long as you just call it on GameMode.BeginPlay you will be fine.

Thanks, I’ll study a bit more and try that out :slight_smile: