Invert collision to reset jump strength

Get help using Construct 2

Post » Sat Apr 13, 2013 1:07 am

Hi,

I'm working on a bumper that increases jump strength. Now, I have a system in place to ensure the strength of the jump increases with every consecutive jump and then stays that way after a set number of jumps.

Following this, I want to reset the variable that is responsible for increasing the jump strength and resetting the jump strength itself.

It is for this purpose that I need to Invert the collision check, because I intend to use this bumper on a number of different surfaces, which means that the player will need to have the jump reset.

Is there any way to do this?

https://www.dropbox.com/s/zkshc2fgyegc8zp/01.capx
B
3
Posts: 12
Reputation: 499

Post » Sat Apr 13, 2013 1:21 am

By invert the collision, do you mean check if the player isn't colliding?
Project Lead of Zems Online Card Game

Producer at Impulse Limited
B
18
S
6
G
3
Posts: 677
Reputation: 5,194

Post » Sat Apr 13, 2013 1:27 am

Hey Fynnick.

Try inverting a "Object is overlapping Object" condition instead of using the normal colliding check. GenkiGenga2013-04-13 01:27:45
ImageImage
B
73
S
16
G
6
Posts: 1,038
Reputation: 10,473

Post » Sat Apr 13, 2013 1:32 am

[QUOTE=Excal] By invert the collision, do you mean check if the player isn't colliding?[/QUOTE]

[QUOTE=GenkiGenga] Hey Fynnick.

Try inverting a "Object is overlapping Object" condition instead of using the normal colliding check. [/QUOTE]


I tried it, and it doesn't work, since it conflicts with the variable that increases the jump strength everytime it collides with the bumper.

I need it to reset the variables when the object is not in air and while it is not on another surface, not colliding with the bumper.
B
3
Posts: 12
Reputation: 499

Post » Sat Apr 13, 2013 2:44 am

How's this?

http://db.tt/3w9BuuyT
ImageImage
B
73
S
16
G
6
Posts: 1,038
Reputation: 10,473

Post » Sat Apr 13, 2013 4:04 am

[QUOTE=GenkiGenga] How's this?

http://db.tt/3w9BuuyT[/QUOTE]

Yep I have that as a hotfix backup, but I wanted to know if there was a way to do it for any number of different objects so that there is no need to check collision with every single one of them.

That said, thanks again :)
B
3
Posts: 12
Reputation: 499

Post » Sat Apr 13, 2013 5:07 am

No worries mate, and yes you can do that with families.

Set all your bouncable objects into a family and then you can use that to test the collision instead of the sprite. Very handy but you need to have a licensed version if you dont already.
ImageImage
B
73
S
16
G
6
Posts: 1,038
Reputation: 10,473

Post » Sat Apr 13, 2013 5:20 am

Oh yeah, that'll definitely do the job. N yeah using a licensed version :)
B
3
Posts: 12
Reputation: 499


Return to How do I....?

Who is online

Users browsing this forum: Artpunk, OddConfection and 19 guests