I want to make a pipe game mini game in the game I am working on. I’m still pretty new at unreal and blueprints and have no idea how to do this.
So far I have the “pipes” (cubes with textures to show directions) spinning the way I want and you can complete the puzzle, but the game doesn’t know that.
Here’s how I have the cubes spinning
I named the cubes cubeA-cubeP going from left to right, top to bottom.
cubeD(top right) is where it starts and cubeM(bottom left) is where you want to end up.
For ease, I want to have the air(these are air vents) to want to always or at least automatically flow straight i.e. flowing from cubeG left to cubeF it would go straight to cubeE if it could go into cubeE which it can’t in that picture, but you should get what I mean.
HERE is where I am now.
Ok, so I pretty much figured out how to do the arrays of everything, except it isn’t possible with blueprints and I’m not sure how to go back and forth between blueprints and c++, also my team has decided to do everything in blueprints.
I have an array of 16 actors and each of the actors has the component variables which are booleans: Left,Down,Right,Up,Flow
But the problem with this is each time I reference one of the booleans it has to be specific to what object it is from. Like I want to check if the Up is true for the 7th node(the one below the starting node,) I would have to use cubeH_Blueprint’s Up and I can’t do things in general. This would force me to actually code out every possible path which would be ■■■■■■■ ridiculous.
So I can’t have an array of arrays and I can’t easily access each boolean from each member of the array of objects easily. What can I do?
The algorithm I want to use goes something like this.
curNode = 3
if curNode.Left{
curNode -=1
ifCurnode.right{
set curNode.flow = true;
if curNode.left{
curNode-=1...
}
if curNode.down{
curNode +=4...
}
if curNode.Up{
curNode -+4...
}
}
}
else if curNode.Down{
}