Registering one "overlapping" condition at a time

0 favourites
  • 4 posts
From the Asset Store
Time rewind like in "Braid". Choose objects that will be affected by time rewind

    I bookmarked the spot

    i'm trying to have the red square (which is mask for interaction) to enable the outline effect on the green npc's, but in a way that stays with the first object interaction until it stops overlapping with it (which is easy) - and doesnt interact with any other object while its interacting with the initial one (this is where i hit a wall)

    btw press "O" for god mode in-game

  • The game confuses me but what you're probably after is blocking out the initial nMask logic with a variable. You could set an instance variable on the nMask itself and condition for nMask.count = 0 where variable is set, set the variable on overlap so the count is greater than 0 and locks out the logic, then when not overlapping (event 10) and count > 0, set the count back to 0 by toggling the instance var to allow for further overlaps.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I see you fixed that issue with event groups.

    Instead of boolean variable isInteracting, use numeric interactingUID, with default value -1.

    Then change your events to these:

    Grabber interactingUID=-1
    Grabber is overlapping nMask  -> Grabber set interactingUID to nMask.UID
    nMask Pick by Unique ID = Grabber.interactingUID
    Grabber is NOT overlapping nMask  -> Grabber set interactingUID to -1[/code:10dl9stx]
    When Grabber.interactingUID is set, you can easily pick nMask instance by UID in other events.
  • I see you fixed that issue with event groups.

    no i hate event groups after you showed me how much better doing stuff with variables is, this neutral NPC sheet is the old one, enemy one is fixed as you taught me and works like a charm

    so does this by the way, thank you so much. I wouldve probably given up a couple of times if it wasnt for you

    thanks guys

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)