Download

Player Icons

hi guys,
I have 10 + characters in my game it is turn base and i would like to know how do i get there icons to change when its the next players turn. At the moment i have an image cast to the widget of 1 icon but i cant figure out how to make it change once its the next players turn ?

Difficult to say without seeing your widget and blueprints, but you probably have some variable like “currentcharacter” or so that you update when the turn ends, so why not use that to change the icon?

Have your Texture2D (Icon) property inside your character class, then you would set it properly at some point in your game on each instance you spawn.

Have a reference of the current turn’s character inside your player controller (setting it properly whenever the turn changes) and access it under your Widget (GetOwningPlayer I believe), then you will have a chance to get the Texture of the current turn’s player in question.

This is an overview. How you will make it from your code? I have no idea how your code ir working right now…