User Tag List

Results 1 to 7 of 7

Thread: Simple Question

  1. #1
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export Module

    Join Date
    Aug 2011
    Location
    Beverly Hills, CA USA
    Posts
    508
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Simple Question

    If I have two overlapping Actives and the user clicks on an area where both exist, how do I capture the event only for the topmost Active?

    Capture.jpg

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleUnicode Add-on

    Join Date
    Oct 2011
    Posts
    221
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I had a similar situation, just that I wanted the back active...
    I assigned a variable to every active and kept track of its status along the game - front or back.
    When clicked, I initiated action only if the status of the active object was 'Back', in your case 'Front'.

  3. #3
    Forum Moderator Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export ModuleXNA Export Module
    ProdigyX's Avatar
    Join Date
    Jan 2011
    Posts
    1,197
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    "Only one event per loop action"

    will choose the top most

  4. #4
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export Module

    Join Date
    Aug 2011
    Location
    Beverly Hills, CA USA
    Posts
    508
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Only one action when event loops seems to select neither the topmost or the bottommost when I try this; it's almost random.

  5. #5
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleSWF Export Module
    Konidias's Avatar
    Join Date
    Aug 2009
    Posts
    1,546
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    When the player clicks over the objects, run a fastloop and spread value through the objects, or use ForEach to cycle through the objects. Also set a global variable to 0 before the loop starts.

    In the loop, compare the global variable to the Y position of the object. If the global variable is less than the Y position, set the global variable to the Y position.

    After the loop finishes, you now have the Y position for the bottom most object.

    Then you have another click condition that is your actual condition (underneath the loop):

    Player left clicks mouse
    +Mouse over objects
    +object y pos = global variable, then that is your top most object

    Of course, this only works if the objects are topmost toward the bottom and farthest toward the top. Otherwise you'll need to set up a layer variable for the objects to be checked against.

  6. #6
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleMac Export ModuleUnicode Add-on
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    AyreGuitar's Avatar
    Join Date
    Jan 2011
    Location
    Wales, UK
    Posts
    1,113
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Example

    Keith - I needed something similar for my latest game, so here's an example (requires Layer Object and ForEach)
    Whilst this uses groups it can easily be modified for a single Active.
    Hope it helps.
    Attached files Attached files

  7. #7
    Forum Moderator

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export ModuleInstall Creator Pro
    nivram's Avatar
    Join Date
    Jul 2006
    Location
    Bandon, Oregon
    Posts
    6,773
    Mentioned
    12 Post(s)
    Tagged
    0 Thread(s)
    Select Obj ext maybe?

    Marv
    ​458 TGF to CTF 2.5+ Examples and games
    http://www.castles-of-britain.com/mmf2examples.htm

Similar Threads

  1. A simple question (using PMO)
    By LavaWave in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 10th November 2009, 05:19 AM
  2. simple question
    By Taco in forum Multimedia Fusion 2 - Technical Support
    Replies: 10
    Last Post: 3rd August 2009, 05:33 AM
  3. Hello Please help with this simple question
    By sephetious in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 12th September 2008, 07:23 PM
  4. Simple question
    By ecluse in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 18th January 2008, 10:34 PM
  5. Simple Question
    By Peter in forum File Archive
    Replies: 4
    Last Post: 4th August 2007, 04:51 AM

Posting Permissions

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