issues with blueprint with custom event

I’m

trying to have a moveable object in game with a linked key press, only problem is as you see in the image the event is locked to self and I’m at a loss of how to rectify this.

1 Like

That’s expected behavior. Input events are always bound to the owning Blueprint, so the target is locked to Self. The fix is to handle the key press in the PlayerController or Pawn, then call the custom event on the movable actor by keeping a reference to it. Alternatively, enable input on the actor itself and trigger the movement logic directly there, but the key event still won’t target another Blueprint automatically.

To drag something to that ‘target’ node input, it has to be the same ‘type’ that has that function defined within it. Pick Up is defined in BP_Block, so you need a BP_Block reference to drag there.

I think, though, you mean to have the ‘pick up’ event defined in your character, rather than in the block.

Generally for this type of thing, you should store that BP_TopDownActor reference you get when you do the overlap in a blueprint variable like “OverlappedCharacterRef” of type BP_TopDownActor, then when pressing your key, check if that var is valid, if so use it. You can do a ‘validated get’ by dragging the var from the sidebar “Get MyVariable”, right click and convert to validated get… then use the isvalid output

Make sure to clear the OverlappedCharacterRef variable when overlap ends (just “set” it, leave input empty).

Also, youre using playercontroller in two different ways for enable/disable input. Look at your connections there, it should be in the playercontroller input for both. PlayerController is a child of Actor, so it fits both inputs.