blueprint

Save selected class attempt

  • Exposure: public
  • UE Version: 4.15

Orero

November 11, 2022, 1:35 pm

This is part of the event graph for my UI widget. What I'm trying to do is let players select a class via that widget, and have that value saved to their character so that it persists for that character across logouts and server restarts.

I'm using an enum to store the selected class. The enum is in an AC attached to BasePlayerChar and is set to replicate, and the savegame flag is checked. The AC is also set to replicate. The comparison check in this blueprint is to check whether it's the default value (no class) or not. Both are linked to the same result now but that's just until I can get this part working and move on to the rest of it.

As posted, this actually works on a simulated dedi server with only one player connected, but stops working when I add a second player, so I suspect I'm doing something wrong with getting the player character but I'm not really sure. I want it to be chosen per character, so that two different players can choose a different class each.

Click the button above, it will automatically copy blueprint in your clipboard. Then in Unreal Engine blueprint editor, paste it with ctrl + v
Versions
November 11, 2022
  1. Forgot a node

  2. First commit

    See