Help with creating multiple buttons in a scene

Hey all, probably quite a simple problem to fix (I hope), but I’m new to Blueprint so bear with me !

I’ve got a button in my scene that spawns a banana that falls out the pipe and on to the conveyor belt which moves it along, I cobbled this together from a couple of tutorials and it works fine. But now I want a button that spawns a little cube out of the same target point referenced in the banana spawner blueprint, but I can’t work out how to get the button to spawn something different. Copying the banana spawn blueprint and changing the actor spawn doesn’t work, so does anyone have any ideas?

Heres the banana spawn BP:


Here’s the trigger volume BP, so that the banana will only spawn when the player is near the button:


And here’s a picture of the scene for good measure, you can see the second button I have attempted to make on the right


I’d really appreciate any help, thanks!

What do you mean it doesn’t work, what part about it doesn’t work? There’s nothing there about a cube, can you show the blueprint for spawning the cube?

Edit: Oh, you have two triggers. I presume one is for the banana and one the cube? You would need to recreate the trigger volume BP for that one too, presuming yo haven’t already

Hi Mosel3y, the problem I’m having is getting a reference to the event dispatcher inside my spacecrate (the box) button script. In this picture you can see the references to ‘ButtonTrue’ and ‘ButtonFalse’ in the banana spawner BP. What I can’t seem to do is get references to ‘SpacecrateButtonTrue’ and ‘SpacecrateButtonFalse’ in the level BP.



I hope I explained that properly…

I am bit confused as to where you have everything, what it is in the level BP and what is it’s own BP actor. But either way, you could do all that in the level BP. Which would look like this:

If the player is standing in Trigger volume 1, and “uses” the button by clicking E, then a Banana is spawned. If he is standing in Trigger Volume 2, then a cube is spawned.

you have to enable/disable input of the triggered actors.
try to do all that properly in their own blueprint, instead of doing it in level blueprint.

Hi Mosel3y, the button is it’s own BP actor which contains the logic for detecting whether the player is in the trigger volume, and then the level BP contains the stuff that actually spawns the actor.
I’ve fixed it now though, by pulling in a reference to the button BP, I could pull out a reference to the event dispatcher, so it works now, thanks for your help, and that example there - it’s always good to see multiple ways to solve a problem :slight_smile:

Thanks again!