I have no idea how to solve the following after searching the wiki and a search on "3 in a row" on this forum:
I would like to detect 3 (or more) in a row, with a falling-blocks game.
How the game looks likes/works:
- 1 type of square blocks fall down (like tetris), creating different instances from 1 sprite object.
- they detect the ground and eachother by using "collision".
- after collision blocks stack up.
- if they are next to eachother, I would like them to detect if it is 3 in a row, only horizontal.
- I didn't use the grid-option.
- blocks fall down from a chosen x-point at the top of the screen.
I have tried "compare x-value", but perhaps I didn't do it correctly.
In what direction do you think I must look?
I think if only 1 sprite object can detect if another sprite object is next to it, I can continue.
Or perhaps if I know how to compare x-value of an instance of a sprite-object (instead of standard sprite object).
I've tried 1.5 hours only not to post this question in the forum and find it out myself, but I ended up with choosing between breaking my keyboard or posting this question.
I chose the first option.
Then posted the question.