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

  • 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.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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 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!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)