Hello! I am having trouble today and would like some help.
I am currently part of a small team of hobby game makers and I have been tasked with creating a grid based movement system for a simple top down style RPG I have been strictly told to stick with Blueprints. Anyway, my thought process was to create a grid of a certain size, lets say 16x16 as standard for old style RPGs, and then stick object location data in a 2d array for collision. Unfortunately there aren’t any 2d arrays, and I can’t get my head around the small amount of ways to kind of create them.
So now I am completely stumped as to what to do. I have been working on this for a few weeks straight now and have gotten absolutely nowhere. I have created a grid actor that creates a bunch of cells either by loop adding additional collision boxes, or loop spawning multiple actors that is just a Blueprint actor with a collision box. Both methods seem to have the same amount of performance depending on how many I create. So now I have a grid, and even that I’m not quite so sure is even the best way of creating a grid, but it’s all I have at the moment. Anyway, I’m stuck on how I can do the following:
move the player pawn to the next cell without resorting to setting actor location, using a timeline, and updating a vector variable when it finishes to store the new location. I don’t like this approach because it isn’t grid based movement, it’s just moving a set amount and this would work horribly with moving objects.
Storing object locations in a variable so that the player pawn or a moving object can not access that cell. Basically I want to set the next cell as inaccessible before the player or moving object actually moves so that there is no possibility of two objects entering the same cell.
Desperate isn’t far from what I am right now with this. I’ve started working on other things at the moment because this is really starting to hurt my head, but I can’t do much because it’s an integral part of the project that many things rely on.