User Tag List

Results 1 to 3 of 3

Thread: Set alpha-blending if overlapping with another object

  1. #1
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export ModuleXNA Export Module

    Join Date
    Jul 2010
    Location
    Italy
    Posts
    368
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Set alpha-blending if overlapping with another object

    Hi all!
    Let's say I have 2 Active objects: a Diamond and a Block. I have many adjacent instances of Block. The Diamond moves with the mouse.
    I want the Block object to set its alpha-blending coefficient to 100 if the Diamond is overlapping with it, and I want to set it to 0 if it isn't overlapping with it.
    Here's my events:

    Always
    -Diamond: Set X position to XMouse
    -Diamond: Set Y position to YMouse

    Block is overlapping Diamond
    -Block: Set alpha-blending coefficient to 100

    NOT Block is overlapping Diamond
    -Block: Set alpha-blending coefficient to 0

    The problem is that while the Diamond is overlapping ANY Blocks, all blocks that are overlapping, or that previously overlapped with the Diamond, are semi-transparent, not only the ones that are currently overlapping with the Diamond!
    How can I do what I want?
    Attached the mfa showing this problem.

    Thank you in advanced for your help!
    Attached files Attached files

  2. #2
    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)

    Solution

    The problem is your last line - I think it just finds the first block that is NOT overlapping your Diamond and acts on that rather than all instances that are not overlapping.
    Solution: simply always set your blocks alpha to 0 BEFORE you check for Block overlapping Diamond and delete your last line.
    Example attached.
    Attached files Attached files

  3. #3
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export ModuleXNA Export Module

    Join Date
    Jul 2010
    Location
    Italy
    Posts
    368
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you very much, your solution works perfectly!

Similar Threads

  1. Rudimentary Alpha Blending Window Ext
    By gizmo in forum Extension Developers Lobby
    Replies: 5
    Last Post: 29th June 2018, 12:09 PM
  2. [Bug] - Alpha Blending
    By scottige in forum Android Export Module Version 2.0
    Replies: 2
    Last Post: 26th February 2012, 03:50 PM
  3. Semi-Transparency/Alpha Blending not in 256 colors.
    By Corlen in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 21st February 2012, 01:08 AM
  4. Semi-transparency VS Alpha-blending
    By ASD in forum Hardware Accelerated Runtime
    Replies: 4
    Last Post: 3rd January 2011, 05:34 PM

Tags for this Thread

Posting Permissions

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