Door is not opening from event, event not getting fired?

Greetings,

I’ve been following along with the tutorial for creating events and exposing them to Blueprints. I’ve got the Openable_Door_BP component with the event handler for OnOpenRequest executing a SetActorRotation function in the Blueprint. My OpenDoor.cpp fires the event we created with the macro DECLARE_DYNAMIC_MULTICAST_DELEGATE(FOnOpenRequest); I’ve been able to prove this in the code by simply adding a debug line right before the call to OnOpenReqeuest.Broadcast();. However it seems that once OnOpenReqeuest.Broadcast(); is called, the event isn’t being handled anywhere. I’ve recompiled the C++ project, the BluePrints, the map, everything. I even added a LogText node to the Blueprint to see if it was somehow a problem with my rotation. It does not appear to be. I’m at a loss.

My project is on Github, at this commit: https://github.com/cdunlap/udemy_ue4_building_escape/tree/64f820c56a0373d4d87afe6dda0c44386b425fc0

Any help would be appreciated. Thanks!

Update: I changed the blueprint log to Print Text and I see that the event is being fired and handled. The door is simply not responding to rotation. I’ve also made sure the object is marked as movable in the editor.

I’m a dink… I forgot to remove the door close logic. Since the DoorLastOpenTime was not being set the way it used to in OpenDoor(), the evaluation GetWorld()->GetTimeSeconds() - DoorLastOpenTime > DoorCloseDelay in TickComponent(...) always returned true, closing the door immediately. It was happening so fast it appeared as though the door never opened.

I guess DoorLastOpenTime was refactored away in a lesson and I missed it somewhere. My code didn’t look like Ben’s. I diverged somewhere. This was a self inflicted wound :smiley:

Privacy & Terms