User Tag List

Results 1 to 6 of 6

Thread: Q: Grouping active objects

  1. #1
    No Products Registered

    Join Date
    Dec 2011
    Posts
    13
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    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.

  2. #2
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Would it not be simpler to scroll the entire frame instead of moving four objects?
    Working as fast as I can on Fusion 3

  3. #3
    No Products Registered

    Join Date
    Dec 2011
    Posts
    13
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It might. But I also need to move cloned/additional targets relative to each other. And to allow targets to overlap.

    I got the move working - sort of. I get mouse coordinate changes while dragging, and update coordinates of all 4 active objects accordingly. They all move together, but the target doesn't just move, it is leaving a trail of targets behind. Mind-boggling...

    P.S. I decided to simplify the scenario to understand what's going on. Now, all 4 objects are moved by 10pix when the Left Arrow key is pressed. The trail is still left behind. Is there a way to 'redraw' the frame to lose those artifacts?
    Moving_Trail.jpg

  4. #4
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    EDIT: That redraw thing looks like you're doing something wrong, as that should not happen...

    You can achieve a group movement effect like this:
    Attached files Attached files
    Working as fast as I can on Fusion 3

  5. #5
    No Products Registered

    Join Date
    Dec 2011
    Posts
    13
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Indeed! I'm still struggling with the events editor.

    Thanks for sharing your app, it is clean and elegant.

    Happy New Year!

  6. #6
    No Products Registered

    Join Date
    Dec 2011
    Posts
    13
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Turns out,my Target's "Save backgound" was off, hence the trail...

Similar Threads

  1. Grouping objects?
    By Pineapple in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 16th March 2017, 08:51 AM
  2. Grouping Objects
    By Jibs in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 23rd November 2011, 01:20 AM
  3. Some kind of grouping objects
    By padawan in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 20th October 2010, 09:38 AM
  4. Grouping objects
    By Digitalic in forum Multimedia Fusion 2 - Technical Support
    Replies: 8
    Last Post: 25th June 2010, 04:43 AM
  5. Grouping Objects
    By Mr_Monkey in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 3rd December 2006, 07:34 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •