Monokkel
(Monokkel)
June 24, 2019, 7:26am
2827
Dan.Ott:
We are removing the units from the grid via BP_GridManager’s method “RemoveUnitFromGrid”. The healthbar remains at the last tile on the grid as the position of the units is only updated when realtime is over & turnbased combat continues. To continue combat we use the method you mentioned (ConvertLocationToIndex3D) and the new location & grid index is calculated correctly. Here we use GridManager’s “AddUnitToGrid” method. Everything seems to work fine except for the remove part, we’ll try out removing / adding the keys in GridUnits TMap instead of using RemoveUnitFromGrid now.
EDIT: Allright, clearing the GridUnits TMap instead of using RemoveUnitFromGrid worked
Great that it worked I didn’t think about the heath bar thing until now, however. How are you moving the unit? If you move the entire actor the health bar should come along for the ride. Are you only moving the skeletal mesh or something?