Hi… I was wondering if anyone could help me out with some direction/approach
I’m able to kick cubes around a grid…
ie. 1 grid per kick(100units)… and can kick cubes when there are multiple cubes lined up and i know what group of cubes to kick if there is a gap between cubes etc…
But now im trying to do a long kick…
Which is to kick them the length of the grid board… if its a single cube or even a group of 2-3-4 cubes, (that’s no problem).
My Issue is:
If i have 2cubes grouped and then a grid gap and then another cube or something similar to that… How can i get the first grouped cubes to push the other cubes further down the line if they are in the way
So basically im needing something like this… But physics don’t seem to controllable enough… so i need to code it.
Maybe something like “Check next grid” → “Check if it can move forward” → “If block check if that one can move forward” → “Move” + Return true or “Don’t move” + return false.
Like this a signal of “Move in direction” will be forwarded indefinitely and they will all move if it’s possible or they won’t. Of course you need to do all those functions like “Check next grid” etc.
Nope. cant get that to work. not dynamic enough.
when i trace out. for the actors that i add to the array. i need to know if there are blockers in the way amd so on… so i feel i need to have it all before the final event is fired. and not leave it to the cubes itself if itself can move or not.
I don’t really see how it wouldn’t be dynamic but if you don’t want that the only other obvious solution is that you have one grid actor which handles everything.
dynamic maybe is bad choice of word… but for example if i had 2 cubes and a gap and then 1 cube. with my understanding. the first cube would say- no i cant move. and the 2nd cube would say- yes i can move. and then the 3rd cube would also say yes i can move. but of course kicking cube 1 should move cube1 and 2… if 2 has a grid to move into… that’s why what you explained with my understanding it don’t work… because cube 1 returns false… maybe i have it all wrong
Not at all. You would tell cube 1 to move. That one checks the next field where it finds cube 2.it then asks cube 2 if it can move. Cube 2 checks, finds an empty field starts moving there and responds yes it can move. Cube 1 then moves as well. Cube 1 will always be the origin of the movement and will repeat until a cube can’t move anymore or some other restriction kicks in.
Thank you for helping. Im still struggling to get them all moved to the end…Whats frustrating is its seems a simple task. but not understanding something any screenshots of your idea in blueprint would be really appreciated.