The group disappearance can be handled using a
value procedure that accepts a sprite component and returns
a group number for that sprite.
Say Sprites P1,P2,P3 belong to group 1,
P4,P5 belong to group 2,
P6,P7,P8 belong to group 3 ...
value procedure GROUP(sprite) returns (result)
return lookupInPairs(
item: sprite,
list: make a list(
make a list(p1,1),
So your collision event of sprite Bullet5 hits other
would be
for each targetSprite in list allTargetSprites <=== fill it at Screen.Initialize
if group(other) = group(targetSprite) then
setAnySprite.Visible (targetSprite, false)
end if
end for each
You could code a common procedure hideOtherGroup(other)
and just call that procedure from each projectile collision event.
ABG