Again, apologies for for the late answers. I’ve been serving as best man in my brother’s wedding in France and the past few days have been very busy. Things should return to normality very soon and I’ll be back to giving prompt replies.
Looks fantastic! Looking forward to seeing it in motion.
I’ll need to look at this myself when I return home at the end of this week. I do no have any likely guesses for the error message without checking. Good that it does not cause any actual issues, but I will of course still need this find a fix to prevent message log spam.
I believe your assessment of the cause of this issue is correct. I’ve fixed this bug in my internal build already. To fix this you will need to properly remove the reference to the unit in the woke units array when the unit is destroyed. You can use the OnDestroyed default event in the unit blueprint for this. You also need to remove the awake status effect actor. Also OnDestroyed loop through the status effects array of the unit and destroy all actors referenced in the array. I believe that should do the trick.
Hello AceD,
sure, it should be possible to use WASD-movement. If your game has a locked camera view you could do something like this:
When pressing W, get the index variable of the player unit. From the vector field array in BP_Grid_Manager get the vector at this index - GridSizeX. Move the unit to this location through a lerp or other means. At the end of movement update the index of the unit to the index of this location (index - GridSizeX). For moving right use index + 1, left index - 1 and down index + GridSizeX.
If you have a rotating camera you will need to double a bit of math to translate the forward vector of the camera into a direction on the grid, but after that the process is similar.
For your second question, use the Vector to index function in BP_Grid_Manager to translate a location into a grid index.
Hmm, good question. In older versions of the toolkit I used 0 to represent adjacent tiles that could not be moved between. Back then what you are asking would be difficult to implement.
With the current toolkit I don’t see why this should not be doable. With any such basic changed to toolkit functionality I have to be careful, though. So many other processes depend on the pathfinding function that it is som hard to predict the consequences of making such alterations.
I’m not sure what is causing edges with a cost of 0 to act like having a costly of two, but I will look into it. I think this should be solvable.
Again apologies for the delay in replying providing support. My life will soon return to normal and I’ll be able to provide quicker and more thorough support.