The game always spawns the default character even when I selected a different one. How to I fix this?
So I'm trying to make a character selection screen in my game, and I have many different levels in my game and I don't want a character select screen to pop up every time the player goes into a new level. This is what I have so far. The first image is of my character select widget, each of the character buttons are represented as an int. The second image is of the level blueprint. In the Level blueprint, it's using the int given from whatever button was pressed in the character selection screen and spawning in the character selected. That's how it should work, however, no matter what character is selected it automatically chooses the first one.
asked Jul 06 '18 at 04:17 AM in Blueprint Scripting
The issue is most likely in your Event BeginPlay. You are spawning in the character based on your int as soon as the widget is spawned in. Change the BeginPlay event to a custom event that you call when one of your character selection buttons is pressed to change the int before you spawn in a character.
EDIT: To test if this is the issue try changing the default value of CharChosen and see if a different character is spawned in.
Follow this question
Once you sign in you will be able to subscribe for any updates here