Hi, I’m trying to build the game Marble Solitaire in 3D: if you’re not familiar with the rules there is a cross shaped grid of 32 marbles, the player jumps marbles over each other into existing spaces with the goal to eliminate all the marbles from the playing board except one.
I’ve started by making a 2D array.
I made a struct with two variables, an integer array and an object array.
I then created an array of this struct to make my grid of objects.
I’m very new to Unreal and BP - and I’ve got stuck on trying to work out my next step.
I don’t want to have a visible board the objects sit on, so the player can’t click on board squares.
Do I create a second array of vectors so that when the player clicks on the objects to move them, I can work out if the move is valid before looking at the first array to see if there is an object there?
Would anyone be able to point me in the right direction?
I’ve attached an image of my BP array of objects. (I collapsed nodes to keep it tidier - the image is just of the first index of the array, but the rest are set up the same) Any help would be so much appreciated!