Hey, so I am having an issue with a project I'm working on. I'm trying to make a puzzle game and I want to use collision detection to determine when blocks should fall. Right now I have my project setup so it automatically creates an entire game field worth of blocks just so I can test basic mechanics and get things working.
The issue I am running into is with the Event "Overlapping at Offset". Basically, every time a block is destroyed I start a sub-event which looks at all of the remaining blocks and tests them against the space below them. If the space is empty, it is supposed to cause the block in question to drop down into the empty space. Currently for simplicity I just have it changing an instance variable that is associated with the block. The problem is that for some reason it always detects a block, even when there isn't one there any longer. The only scenario where it is working and is not changing the state of the instance variable is for the blocks on the bottom row.
I think there is an issue that the blocks are not actually being eliminated from the game fully, so when it checks they are still technically there even though they aren't showing up. This makes sense with the fact that the bottom row of blocks has no issue since there were never blocks below the bottom row.
I am removing my blocks with the Destroy action and http://davesilvermanart.com/Chromathud.capx is a link to the current version of my project in-case you want to look it over to try and understand what I'm saying better.
Basically my question is, does the destroy command eliminate an object entirely and prevent it from affecting collisions? If so, why might this be happening?
Also, the way I currently have things setup the blocks are 44x44 pixels and the origin is in the center of the box. When I perform the check to see if there is a block below the one I'm looking at I have to look 45+ pixels below the block to make the bottom row work, but since my origin is in the center of the block, shouldn't I only have to look 23+ pixels below since 22 is half of 44?
If anyone can help I would greatly appreciate it.
PS: in-case you downloaded the game, the idea of the game is to add up blocks to equal the target. You select blocks with left-click, deselect with right-click, and blocks don't have to be touching to be used together.