User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 19

Thread: How to best select one object when over instances of same object?

  1. #1
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export Module
    Outcast's Avatar
    Join Date
    Jan 2011
    Location
    Sweden
    Posts
    3,366
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)

    Question How to best select one object when over instances of same object?

    This is a problem I have from time to time and I don't think I don't know what the best solution really is. It feels like it should be possible to do in an easy way, but I have not found a good way.

    What I have here are 4 identical objects that overlap and I want to "select" the object that the mouse overlaps, but I only want to select one at a time even though the mouse might actually overlap several at a time. The most "logical" way I find is to insert in the condition to select one object at random, but the problem then is that it selects one object at random every frame so it ends up flickering between all the objects the mouse is overlaping. Is ther any condition instead to do this but keep the same object selected at random and not choose a new one at random at every frame?

    If not, what is the best method to do this? I have uploaded an example with the problem
    Attached files Attached files

  2. #2
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export Module
    Outcast's Avatar
    Join Date
    Jan 2011
    Location
    Sweden
    Posts
    3,366
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    The best would even be that it choose the object whose hotspot the x and y was closes to, that would feel the most logical as a player when selecting between objects as it would always be the one "closes to the mouse x and y", even though they overlap. Not sure if that is even more complicated though I guess.

  3. #3
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export Module
    Outcast's Avatar
    Join Date
    Jan 2011
    Location
    Sweden
    Posts
    3,366
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    If the hotspot was in the center of the object that is.

  4. #4
    Forum Moderator Fusion 2.5 MacFusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)Firefly 3D Module (Steam)
    NaitorStudios's Avatar
    Join Date
    May 2010
    Location
    Brazil
    Posts
    1,122
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    Here's a simple solution
    Attached files Attached files

  5. #5
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export Module
    Outcast's Avatar
    Join Date
    Jan 2011
    Location
    Sweden
    Posts
    3,366
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by NaitorStudios View Post
    Here's a simple solution
    Thank you! That was very clean and neat!

  6. #6
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export Module
    Outcast's Avatar
    Join Date
    Jan 2011
    Location
    Sweden
    Posts
    3,366
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    Just a slight problem, the animation stops when changing the animation when doing this way? I tried to restore animation frame but it seems it does not work

  7. #7
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export Module
    Outcast's Avatar
    Join Date
    Jan 2011
    Location
    Sweden
    Posts
    3,366
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by NaitorStudios View Post
    Here's a simple solution
    Also do you know the "logical" reason to why the animation stops on the global value condition but not on the mouse overlap? I can't see any logical reason why it does it on the first but not on the second :S

  8. #8
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export Module
    Outcast's Avatar
    Join Date
    Jan 2011
    Location
    Sweden
    Posts
    3,366
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    Oh actually it did happen on the original example also. So that is a problem. (Is it possible to edit posts somehow instead of having to add a new post ? :S )

  9. #9
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleFirefly 3D ModuleInstall Creator Pro
    aenever's Avatar
    Join Date
    Jun 2013
    Posts
    1,651
    Mentioned
    34 Post(s)
    Tagged
    0 Thread(s)
    Not sure about the logic but if you add a negated mouse pointer over Active, restore animation frame of Active, it will work.

  10. #10
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleFirefly 3D ModuleInstall Creator Pro
    aenever's Avatar
    Join Date
    Jun 2013
    Posts
    1,651
    Mentioned
    34 Post(s)
    Tagged
    0 Thread(s)
    Is this what you're after?

    Select keep frame number on select.mfa

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Replies: 5
    Last Post: 8th December 2020, 01:08 PM
  2. Replies: 2
    Last Post: 13th March 2018, 06:06 PM
  3. Replies: 3
    Last Post: 18th May 2015, 07:16 PM
  4. Object order problem with multiple instances of the same object
    By tom79 in forum Multimedia Fusion 2 - Technical Support
    Replies: 14
    Last Post: 1st November 2011, 06:38 PM
  5. [Request]Select Object - Select in events?
    By LB in forum Extension Development
    Replies: 1
    Last Post: 15th July 2009, 10:55 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
  •