How do I Make the variable back to 0

0 favourites
  • 4 posts
From the Asset Store
Easily store, modify, read and manipulate colors with Color Variables!
  • Hello!

    I have ben trying to solve this problem for month without any results.

    Look at the example file i upploaded:

    The player is overlapping "blue box" and the "blue box" value goes from 0 to 1 <- Alright!

    Then i whant the "blue box" value to go back to 0 when the player not overlaping the "blue box" anymore.

    I have made a difrent way aroud to solve this problem by making the "blue box" value to go back to 0 when overlapping the yellow boxes. That work but is there any better and easier way to solve this problem?

    Please help me/NMROSTA

  • You need to clarify which behaviour you need, as you refer to two different things here. Do you want the variable set to zero when the player is not overlapping at all, or, after the player was completely overlapping and is now leaving the blue box and starting to not overlap. The second one needs clarification as the player could be both entering and leaving the blue box at the same time if you are trying to isolate partial overlap.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • .....

  • Thanks for the fast reply! Thank you Korbaach! You opened up my eyes with the "global number" thing. I think i just got frozen with this variable thing.

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