Set alpha-blending if overlapping with another object

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.
  • 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! :)

  • 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.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!