Game Development Community


#1
03/02/2005 (11:43 am)
Just thinking aloud really, but you could maybe use mount points if you can define them on the fly?

If a red ball is next to another red ball, create a mount point and join the two together. You could then destroy all the balls in one go by destroying the parent ball (the very first ball that has a mount object).

I might be off the mark here, but I'm sure someone else will be along to offer a more sensible solution ;)
#2
03/02/2005 (12:46 pm)
Hmm.. I'd think you could use scriptObjects to define the ball, and keep a linked list of neighbor objects, then on before you delete it check each neigbors color.

%obj2 = newScriptObject()
{
color = blue;
}

%obj = newScriptObject()
{
color = red;
neighbor1 = %obj2;
}

%obj.neighbor1.color

You probably wouldn't want to use Neighbor1... probably a local co-ordinate (guessing the balls will form a hex pattern) to the neighbor?


oo
ooo
oo