I'm working on a stealth game, and what's a stealth game without secret passages that have to be discovered?
As such, there will be Sprites that will fade to 50% opacity when the main character - FINN - overlaps them.
I have two types of Sprites that I have put into a Family, called Passages. Since the level design will be set in a robotic facility of some sort, I plan to have at least two types of hidden passages (for example, a hidden passage that leads also to a vent shaft - a hidden passage in a hidden passage).
Visualize a room with four passages; two on the left, two on the right, and where the first passage seems to end, there's a passage that continues on farther. Each passway is covered by multiple instances of a particular Sprite (this is so I can manage corners more effectively). When one instance of a Sprite goes transparent, all other instances IN THAT GROUP also go transparent, even if FINN is not overlapping them. It's AS IF those group instances are "one".
So we have passage one (L1), the passage it connects to deeper in (L2), and the two on the right (R1 and R2).
L1 uses Sprite 1 and has a Family instance variable labeled Group with a value of 1.
L2 uses Sprite 2 with Group variable value of 2.
R1 uses Sprite 2, value 3.
R2 uses Sprite 2, value 4.
Now, individually, I can get any group, regardless of which Sprite is used, to render transparent when FINN overlaps that group. My problem is when FINN overlaps two different groups simultaneously. Such as in my illustration here where one passageway connects to another passageway directly.
I'm using an instance variable in FINN in the following way:
FINN overlaps [instance of Sprite] ==>> Set FINN.Group# to Sprite.Group#
PICK all Sprites where Sprite.Group# = FINN.Group# ==>> ......and so on.
I recognize that this set up only allows FINN to recognize ONE passageway to be identified.
And that's where I'm having my trouble. I need to have all applicable groups activated.
Can someone suggest a solution, please? What am I not seeing? THANKS!
I'm seeking Narnia. Who wants to come with me! Aslan is on the move!