If not nearest

Get help using Construct 2

Post » Sun Jun 23, 2013 9:25 pm

Please see the attached capx

Not Nearest

I'd like to only have the closest object transparent, and all others full opacity.

The only options I seem to have are nearest and furthest, but I'd like to be able to invert the condition, so it says "Is not nearest".

Anyone able to tell me the steps I'm missing?
@bearboxmedia
www.bearboxmedia.com

Nintendo Wii U Developer using Construct 2
B
79
S
12
G
7
Posts: 961
Reputation: 10,717

Post » Sun Jun 23, 2013 10:13 pm

Try this workaround: capx
B
83
S
32
G
23
Posts: 121
Reputation: 15,041

Post » Sun Jun 23, 2013 10:49 pm

@Kastas - Very clever and simple! Thank you! I'll do this with booleans or variables :)
@bearboxmedia
www.bearboxmedia.com

Nintendo Wii U Developer using Construct 2
B
79
S
12
G
7
Posts: 961
Reputation: 10,717

Post » Sun Jun 23, 2013 11:37 pm

@Kastas

I've tried to edit your system so that it's based on another sprite, rather than the mouse, and it appears to be having some difficulty.

Any ideas?

https://dl.dropboxusercontent.com/u/50465867/Construct/NotNearest.capx

*Dear me - Trying to do it using the lowest/highest variable as well, but even that doesn't allow you to invert!AnD4D2013-06-23 23:43:21
@bearboxmedia
www.bearboxmedia.com

Nintendo Wii U Developer using Construct 2
B
79
S
12
G
7
Posts: 961
Reputation: 10,717

Post » Sun Jun 23, 2013 11:55 pm

Phew, finally did it... but I had to introduce a global variable (Still can't figure out how to do local variables after all this time).

Would have been so much easier if I could just say "If Closest - do this, else, do this"

Anyone know why this isn't possible?
@bearboxmedia
www.bearboxmedia.com

Nintendo Wii U Developer using Construct 2
B
79
S
12
G
7
Posts: 961
Reputation: 10,717


Return to How do I....?

Who is online

Users browsing this forum: danul777 and 3 guests