Ahh, I am lost.. Will take a break for a bit to rethink again what you are advising.
So far , I am stuck on 2 things:
1) Unfortunately, I am not storing X,Y coordinates of TurretBody. At least, I cannot use them since they are in a separate event where another bullet overlaps TilemapBoxEnemy ( i described it earlier)
It would have been cool to continue this event , since i have all the necessary coordinates of TilemapBoxEnemy and of Turret Body. But I cannot do it cause 2 different bullets cannot overlap an object in the same event. So I started a new event where a new bullet (bullet2Player) overlaps a TilemapBoxEnemy ( A turretBody has been already created so I cannot create it again), and I can store only coordinates of TilemapBoxEnemy. But I understand that without storing of X, Y coordinates of turretBody in this new event , nothing can be done.
2) For checking if there is a turretBody above TilemapBoxEnemy .etc. should I use Compare two variables?
If so, the system does not understand this expression.
For "Else", should I use "System - Else" ?
1. If you store the TileX,Y coordinates in the objects as variables you can use them wherever you want, its no different than storing something else.
If I understand you correct regarding two bullets not being able to overlap a TilemapBoxEnemy in the same event, its because you need to add a for each bullet, otherwise C2 wont know that you are talking about individual objects. There should be no issues doing this. But of course you have to make your event able to handle it when designing it.
2. Yeah if you have stored the TileX, Y its just comparing two variables with each other.
Here is a simplified version of what I believe you are trying to do:
The red dot is a bullet, TB is the TurretBody and the cactus is the TilemapBoxEnemy.
TB are sprite objects just placed on the tilemap. The cactus is on the tilemap it self and the bullet is also just a sprite.
The text keep track of the bullet Tile X, Y coordinates which I convert from its X,Y coordinates.
The list is just a log which will give feedback when the bullet hit the Cactus.
In this example the bullet is just linked to the mouse, but could be a sprite with bullet behaviour if that is what you use. As it moves around the tilemap its X,Y coordinates are converted to TileX, TileY and shown in the text object. So TileX and TileY are just 2 variables that I have added to the bullet sprite.
The TurretBodies are created at the start of layout and in this case since I know where the cactus is, I just add the predefined numbers to there variables. But would be no different if these where converted based on where the cactus was placed on the tilemap. I just did it this way to keep it simple. But also the TB object have 2 variables added just like the bullet.
The last part is what checks for collision with the cactus and whether there are any TBs around it. So first I make sure that the bullet is actually overlapping the cactus. If that is the case I check each of the tiles around the bullet since I know at since point that the bullet have hit the cactus. So using the TB TileX and TileY and the bullets TileX and TileY and adding the +-1 to either X or Y I can check if these match any TBs. And then just output the result to the log.
But if there were more bullets I would just add a "For each Bullet" to the start of the event.
CapX:
https://dl.dropboxusercontent.com/u/109921357/Collision%20test%203/Collision_test.capx