Checking for Inverted Overlapping

Get help using Construct 2

Post » Thu Jun 26, 2014 6:52 am

Does checking for an Inverted "Is Overlapping Object" (ie is not overlapping object) count as a collision check?

Could this chunk here be any better written?

Image

Thanks dudes.
Made Cosmochoria - www.cosmochoria.com
Currently working on Slayaway Camp - www.slayawaycamp.com
B
27
S
8
G
3
Posts: 384
Reputation: 5,020

Post » Thu Jun 26, 2014 6:59 am

Also just noted this in the manual for "Breakpoints":

Note that Construct 2 bails out of events early if any condition is false. This means a breakpoint on the second condition won't pause the game if the first condition is false, since Construct 2 will immediately skip to checking the next event.

So that kinda answers my question anyway, since it wont be checking all 4 of those every tick, correct.. it will never get to them because:

- First i need to be overlapping a plant
- THEN that plant needs to be hasSprouted = 0 (so that eliminates a majority of any future checks right there)
- THEN I cant be crouching, so that cuts the check down also
- THEN I have to be not teleporting
- THEN I have to not be over a Henge, so finally it checks if im colliding with a Henge---but does it actually do a collision check here?

Is this all right so far?
Made Cosmochoria - www.cosmochoria.com
Currently working on Slayaway Camp - www.slayawaycamp.com
B
27
S
8
G
3
Posts: 384
Reputation: 5,020

Post » Thu Jun 26, 2014 10:45 am

An inverted overllap check is doing a collision check, and just return the inverted result, you could use the debbuger to verify that, also your logic of conditions not executing is correct, but that means that if you are overllaping nothing/eggs while on a plant that has sprouted, and that you are not teleporting nor crouching, the collisions checks will all be done
Game design is all about decomposing the core of your game so it becomes simple instructions.
B
53
S
22
G
18
Posts: 2,122
Reputation: 17,123

Post » Fri Jun 27, 2014 3:24 am

Cool thanks, trying to think if there's some way I can simplify / make sure im not checking for all that stuff every tick. Maybe ill see if its on screen first. then Check collision...? Maybe im overdoing it.
Made Cosmochoria - www.cosmochoria.com
Currently working on Slayaway Camp - www.slayawaycamp.com
B
27
S
8
G
3
Posts: 384
Reputation: 5,020


Return to How do I....?

Who is online

Users browsing this forum: AllanR, Artcadev and 14 guests