How do I check if a condition does not match any obj?

Get help using Construct 2

Post » Mon Mar 13, 2017 12:37 am

I'm making a 2D topdown game and im trying to see if the player is not currently on top of any floor, but only with the floors inside a given layer.
So i have to:
    a) Pick every floor on the layer
    b) If the player does no overlap any of them, then do an action

The problem here is inverting the overlap condition does not do what im intending to do since it will trigger for each non-overlapping floor.
I know a solution would be to set a local variable, loop through all the floors, if the variable is not changed then do the action. However i was wondering if there is a more elegant way of doing this.
B
4
S
1
Posts: 5
Reputation: 310

Post » Mon Mar 13, 2017 12:45 am

Maybe try doing:
>
Pick every floor on the layer
if
the player overlaps any > do nothing
else
do something
B
45
S
20
G
65
Posts: 1,115
Reputation: 38,121


Return to How do I....?

Who is online

Users browsing this forum: brunopalermo and 26 guests