Make a confirmation button for character selection menu

Basically i have a character selection menu with 6 different characters and when you click them it shows you the character on your screen, so i set up a confirm button to lock in the character, but i dont know how to make the confirm button know which character was selected. When i do i try to use on clicked event but you can only use it once and im not sure how to split that for each character. Sorry if this is really stupid im very new to unreal. Thank you in advance!

Not stupid at all, just pretty vague.

That would depend on what selected means here. What is supposed to happen once a character has been selected?

How are you doing it? What does show means? Spawned? Made visible? Classes are swapped around? Something else?

1 Like

So I made a blueprint with a skeletal mesh for each character and they are all set to “hidden in game”, and on the “character selection” widget blueprint I made a button for each character with their respective icons, and when you click on a button it changes the “hidden in game” to false, and I have a confirm button to confirm the character and spawn the actual blueprint of the character not the blueprint with skeletal meshes.
my issue is that I don’t know how to make the confirm button know which button was selected, as in which character is currently set to show in game and then spawn that character and start the next level. I know how to start the level and spawn the characters, but I just don’t know to make it spawn based on which button was pressed before.

This is how I set up to change the hidden in game value for each character:
image

This is how I set up to show the character when you click on character button on the widget blueprint:

And I’m struggling to connect these two but for each character:

I hope this explains it and thank you again for your time, and sorry for the vague first post.

Not that I’d set it up like above, but were I to work with it, I’d probably dispatch the class.

I just don’t know to make it spawn based on which button was pressed before.

You could do it without dispatchers if simplicity is what you’re after: create an Actor Class reference variable in the Game Instance, and have the Fighter (and others) Show function set its value.

When you press LockingButton, fetch the var from the GI and spawn what is needed from class.