[quote="deadeye":ti2v3vx9]Three questions before we begin:
First, are you having multiple pink squares running around with many groups of orange boxes attached to them? Or do you just have one pink square with one group of orange boxes attached? (If you have just one pink square and one group of orange boxes then you don't need Containers.)[/quote:ti2v3vx9]
There will be one set of pink/orange boxes. This may be where I misinterpreted the purpose of containers - The containers page on the wiki says one use is "To connect objects with detectors for collecting passive input (detecting walls, floors, etc.) " which is what I'm going for here.
I assume that by not needing containers you mean that defining the image points and attaching the boxes to them is what will do the job and containers are redundant?
[quote:ti2v3vx9]Second, do all of the little boxes perform the same function, or is there some special reason why you need to have each box be a separate object? (You may be able to make this grid out of many copies of one orange box... but then Containers wouldn't work that way.)[/quote:ti2v3vx9]
I could have done a MUCH better job of explaining this so apologies.
The purpose of the grid is something along the lines of:
A non player sprite (enemy or wall or whatever) overlaps box 1a. This triggers an event which displays "Enemy in zone 1A!" warning elsewhere on the layout. If that enemy moves to box 2A the warning changes to "Enemy in zone 2A".
If a second enemy appears and moves in on box 4E then the warning will change to "Enemies in Zones 2A and 4E!". Different lights will flash, sounds will play and so on depending on which box is being overlapped.
So they all perform the same function (with the exception of the P sprite) which is that of a grid based radar. Once walls or enemies are interacting with P, P is in combat and a whole different bunch of events come into play. the 1a to 5e boxes exist to tell us where the enemies are before reaching p.
[quote:ti2v3vx9]Third, do all of your orange boxes exist all the time, or will some be destroyed and/or created as the game progresses? (If you need to destroy some of them, then again Containers won't work. All objects in the Container must exist, or none must exist. There is no middle ground.)[/quote:ti2v3vx9]
No, all the boxes exist or none exist, no problems there
[quote:ti2v3vx9]Now then. I've gone ahead and shown a method here anyway that will allow your contained sprites to work as intended. But like I said, answer those questions just to be safe, you could be saving yourself some trouble:http://dl.dropbox.com/u/529356/containers.cap
What I added:
1. Image points to your pink sprite. It would need 25 in total, one for each of your orange boxes. I <Snip>
I've tinted the orange boxes for the group on the left with a red color filter so you can see that the container is separating them properly and the matching ones are lining up only with their contained pink sprite.[/quote:ti2v3vx9]
Thank you very much ! That appears to do exactly what I was thinking... and a lot more elegantly than the first few drafts I'd knocked together
I'll see if I can knock something together in the next day or so to give you a clearer idea of what I had in mind, hopefully it'll surprise and delight.