I'm reviving this thread!
Okay, here's the gist:
I have a top down game that has six "zones." It works zelda style. Every zone is basically the same location with invisible sprites on the edges to swap out a custom background.
First, we assume that each zone is 1024x1024px, our focus 400x300 or so.
Next, we determine our colliders: BEACH2JUNGLE and JUNGLE2BEACH. These are invisible sprites that are 20px wide, and 1024px tall. If we set the image point to 0,0, and then set the collider's placement to 0,0 or 0,1014, it will give us a 20 pixel strip along the right and left edge of each zone. When you hit the zone with your character, the following happens...
Player> On collision with BEACH2JUNGLE
System Create Jungle.png at 512,512 (aligned as a background)
System Create JUNGLE2BEACH at 0,1014 (aligned as an edge)
Player set X to 100 (more specific than wrap...)
Player> On collision with JUNGLE2BEACH
System Create Beach.png at 512,512
System Create BEACH2JUNGLE at 0,0
Player set X to 900
This allows you to walk back and forth between maps, scoots you ahead of the collision detector by 100px, destroys unused maps, and destroys the collision detector from the other map. Hopefully that all makes sense.
Because even though swapping screens works well, I still have one crucial problem!
What about my walls? Cliffs, rocks, trees, houses, even water? All the walls I've set up for one zone won't work for every zone. I'd have to destroy everything, and call up NEW walls with NEW coordinates...
And that's where the problem lies. If I CREATE > Wall for one area, and put it in place, resize it to fit, and rotate it just so... and then try to create another Wall somewhere else, its restyling will affect the restyling of the first wall, too.
Wouldn't it be easier to just make a .png of the zone, overlay it on top of your background, and then set it so you could move through the transparent areas? I've tried messing with the collision areas in the animations, but it says to not use more than 8 vertices.
I tried clipping transparent edge, but that did nothing but trim the outer edges, which albeit exactly what it said it would do.
Am I missing something? Is there a way to use transparencies?
And if not... is there a way to give multiple instances of the wall object their own coordinates and size and rotations without overwriting all of them?
Thanks in advance, guys.
Everybody got to come out of the closet... does that mean I'm allowed to come out of the corner? Is that even funny anymore? Do parents still make their kids stand in corners when they mouth off?? These are the questions that keep me out of the really good schools.