Custom Event not working

Hi guys,

i have a problem calling a custom Event from my MyCharacter Blueprint.
I have an InputAction called “MenuOpen” in the MyCharacter Blueprint. It calls the “Open Menu” Event from my GameHUD when a Button is pressed and the “Close Menu” Event when the Button is released. I have a Variable “Game Hud” which is my GameHUD Blueprint.This works fine in the MyCharacter Blueprint. But when i go into my GameHUD, those Events don’t get called.
Any suggestions on how this is getting fixed?

What does the character blueprint look like where it calls these events?

How are you calling these events? I know you said button press but like where is it called? And if you want you could just use “key “keyboardkey””
Like the node “key m”

We encountered a problem where custom events with no parameters never get called. Try adding a dummy bool to the event.

as you see in the attached picture “mycharacter_blueprint.jpg” it is called via an input action, which is TAB in this case.
It is only possible to use keyboard keys in the MyCharacter Blueprint but not in the GameHUD Blueprint, thats why i call those Events.

you can see the Blueprint Nodes of the MyCharacter Blueprint in the attached screenshot “mycharacter_blueprint.jpg” or what do you mean?

can you explain in detail how this should work? because there isn’t any boolean input on the call custom event nodes…

You have to add those at the custom event itself (click on the event and in the details panel you will have the option to add a variable) :slight_smile:

ah via the input section of the event. totally forgot it. I tried that, but it didn’t work.
What i did was i added a boolean variable on the custom event “open menu” in my GameHUD Blueprint. I also added a boolean variable in mycharacter blueprint and connected it to the boolean input of the custom event call.

Could you try to check if your “Game HUD” variable is valid? (Simply use a “IsValid” node and if it’s false print something).

This is the most obvious breakpoint I see right now.

thx dude you are totally right, it wasn’t valid. but how can i access the blueprint when i don’t want to use the cast to nodes. is there a way to do make it valid?

Well I’m not entirely sure what gamehud is in your case.

Either the HUD class or a widget. If it’s the hud you can cast your HUD once to it on the event begin play and save it in that variable and it’ll work like a charm.

If it’s the widget just cast and save the reference when you spawned it (the result from the create widget node). That should do the trick for that case.

Cheers.