Q: Grouping active objects
Working on my first app here, need some help.
I made a static active object representing a stationary target in a shooting game. The target has 3 zones for scoring. When the right mouse button is clicked, a Hit (bullet hole) object is created. The scoring is dependent on which zone / hit collision is detected. Player gets 5 points for hitting ZoneA, 2 points for ZoneC, and 1 point for ZoneD. Zones are hidden behind the target, and all that player sees is the target itself. Zone position is relative to the target.
I want to give players the ability to reposition the target on screen by dragging. Which means I need all 4 active objects to move as one. I also would like to give player an ability to clone targets (and their hit zones) at runtime, to create multiple targets.
Is there a way to 'group' all 4 objects together so that moving or cloning is done for the whole group? Also, how do I make these respond to a drag event as a group?
TIA.