# How do I go to next level when object stops moving?

Get help using Construct 2

### » Sat Nov 21, 2015 11:19 am

Hi!

I started using this program earlier this week to have something to do after school.
I went trought a couple tutorials and it feels like i am making progress learning this every day.
Yesterday i started making a really simple game but i got stuck when i wanted to add a condition for proceeding to the layout (level).

The game consists of a box that is being dropped. The goal is to hit a small platform on the ground to proceed to the next level.

I got everything working just fine but when i try to add a condition that the box cant move when on the platform the game wont move on the the next level.

What i did:

This works:

Event: BOX on collision with GOAL
Action: System Go to next layout

Trying to add the condition that the box cant move while on platform:

Event: BOX on collision with GOAL
Sub-event: BOX Physics overall velocity = 0
Action: SYSTEM Go to next layout

When i open the game with my firefox browser in the debugger mode i can see that both X and Y velocities are both 0. Anyone know why the game wont go to the next layout?

Ive been trying to figure out whats wrong but cant seem to get it working properly.
B
9
S
2
G
1
Posts: 18
Reputation: 690

### » Sat Nov 21, 2015 11:50 am

At the moment of the collision the speed of the object obviously isn't 0, else the actions attached to the event would run..
It might be 0 one tick later, but you are checking it at the exact tick the collision occurs..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

### » Sat Nov 21, 2015 12:42 pm

I was so stupid!
Obviously the velocity is not 0 when the collision occurs!
How could I not figure that out?

But I got this working now! Thank you LittleStain!
B
9
S
2
G
1
Posts: 18
Reputation: 690

Return to How do I....?

### Who is online

Users browsing this forum: Curler, klabundee and 22 guests