Download

Pass class from UI to Character

I have a UI that I want to set some variables in and use them in a character blueprint however it doesn’t seem to like how i am doing it…

As you can see I am setting the variable in the UI

0c60db348777b5e81125ed88e3a9efc5996e0deb.png

However when I try to use it in the character it complains…

character.png

Anyone know how I can do this?

Thanks

This is easy, you need to cast to CharSelect using an object, and then link the target to get char stats. Honestly it will be easier if you make the ‘Char Stats’ array in a game mode BP, and then just cast using ‘get game mode’ as the object, and link cast target to the array. inside the char select.

I tried the game mode idea however when i try to get the value it doesn’t work, it seems that it isnt setting the value or something as the array is empty when i try to access it from the character

b5cbafc569c1ec91173acb89283529d7fc7db1e6.jpeg
ac6c1cd6a79a24b77d149a730f608e991b5c9734.png
2be8b7fbdfa3772a1bb5c3aba4337d87e477068d.png

I was able to get it to work with a gameinstance

I also need to know this because in order for me to switch Armour classes (Light, Medium, heavy) I need to be able to select a different character class through a UI