All depends on how you’re going to use it. If which tiles that are deployable are never changed during gameplay then you are using slighly less memory for storing the information and less time to access it if using a set, so that can be seen as best practice if you look at it that way. In this case the impact should be completely negligable, though, so do whatever makes senst to you.
There is a controlling player variable in the config variables of BP_Unit. Set this to the same value for all units that should be controlled by a single player.
Good to hear! I put a lot of thought into structure when I refactored the toolkit and hope it all makes sense.
Hmm, I honestly don’t see what is going wrong here. Try debugging it. Use print nodes at various points throughout your new functions to print the values generated along the way and try to see where it breaks. For instance, loop through and print the locations you are getting and check if they correspond to the locations of your deployment tiles.
Hey, you’re solution sounds like a pretty good one actually, and probably more elegant than my own in this case. So you need to remember that you need to do things twice, in a sense. Once when simulated and once when animating. If you are breaking movement whensimulating (which is what you are doing with my suggestion), but still outputting all the same locations when animating movement it will seem like the units is still moving all the way, even though grid-wise it has stopped at the trap tile.This leaves you in a situation that whay the player sees and what the computer has to work with is different, which you obviously don’t want.
One way to implement your suggestions would be to add output nodes to the SimulateMove function. A boolean designating whether movement stopped early and an integer with the path index where the movement stopped. Now you can create a new path array where you include only the indexes up to and including the path index where movement broke. Convert these to locations in the same way that it is done regularly with the path indexes array and use this for input to animate movement if you bMovementBroke (or whatever) boolean is true.