How do I Make the variable back to 0

Get help using Construct 2

Post » Mon Oct 13, 2014 12:48 pm

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 :roll:
You do not have the required permissions to view the files attached to this post.
B
8
S
1
Posts: 14
Reputation: 569

Post » Mon Oct 13, 2014 1:10 pm

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.
ImageImageImage
B
71
S
22
G
249
Posts: 3,762
Reputation: 138,575

Post » Mon Oct 13, 2014 2:46 pm

.....
You do not have the required permissions to view the files attached to this post.
B
67
S
24
G
7
Posts: 1,518
Reputation: 11,072

Post » Mon Oct 13, 2014 6:33 pm

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.
B
8
S
1
Posts: 14
Reputation: 569


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 26 guests