I have a big problem. In my game, I have the enemies come at the player at the edge of the screen. This means they have to go under the tile map and can't collide with it. However, I still want them to collide with that same tile map. This has, for some reason, presented a huge problem for me. Here are a few things I've tried and thought of trying:
-Large invisible sprite object in the inner part of the tile map that the enemies hit, turning on a collide flag which then allows them to collide with the tile map. Causes slowdown.
-The outline of the large invisible sprite object in the inner part of the tile map. Causes slowdown.
-Secondary invisible tile map that the slimes collide with that switches on their collide flag. Causes slowdown.
-Idea: array of boxes in the outline of the large invisible sprite. But wouldn't that be a bunch of little boxes instead of one big one taking up the same space causing the same slowdown?
-Idea 2: Using lighting segment feature as fence that the slimes hit, causing a colliding flag trigger. But, again, wouldn't it be just a thin array of small boxes taking up the same amount of slowdown as the large object?
-Idea 3: Using createLine to make a fence that the slimes collide with using pixelPerfect. But, since that line is created out of a large object, wouldn't it again, cause the same large slowdown?
-Idea 4: Using the lighting feature itself by putting several lights of various size in the inner part of the tile map the slimes can hit that would then trigger their collide flag. But, wouldn't the lights themselves cause slowdown as well?
I have no idea. So, my final thought process was this:
Some how, get tell the slimes that they are in the inner part of the tile map.
Which led to the question and problem I have.
How can I check (within the PlayState state itself) if an object part of a group is within a non-colliding tile so I can switch it's colliding flag trigger so it will collide with the colliding tiles of the tile map?
Or, how can I check if an object in a group is in a blank or non-colliding tile map tile?