I’m having troubles finalizing my battle system.
Currently its a direct single target, you make your move, they do the same, but that was mostly for testing of other components.
In the end, i would like there to be a 3x3 grid stored in a array. Where enemy’s spawn at random on the board. This I can manage.
So just for explanatory reasons lets say bottom left is box 0, middle left is box 3, top left 6 and finishing with the 8th square top right.
Let’s say I have a spell that should target in a X formation. This would affect grid locations 0,2,4,6,8.
So the first course of action would be verifying if there is a gameobject(enemy) present in only those specific locations.
/* I understand checking through the entire grid array if any of locations are taken. But not how to call upon a specific list of indexes in that array. */
And if so, call the damage method on to those gameobjects. Which is already prepared.
But I can’t seem to figure out the targeting system I would like to achieve and then checking if it hits anything.
Any kind of assistance or guidance would be greatly appreciated!