Animation running, while object is on collision

0 favourites
  • 4 posts
From the Asset Store
This is a single chapter from the "Construct Starter Kit Collection". It is the Student Workbook for its Workshop.
  • <img src="" border="0" />

    While testing that action, browser\game stop responding. What i done wrong.

    I tried to find answer to that, and tried other methods of realization, but do to my mediocre knowledge of english, unable to do so. Please help, thx.

  • Take that While condition out? I've NEVER had a need for While in Construct, and it certainly doesn't need to be used there since on collision is only triggered when a collision happens so it's basically redundant. Besides, it would need to come before the condition being tested, not after.

    As I see it, your condition is reading -

    On collision



    While what? The While condition is causing it to loop infinitely causing the freezing of the game because it's stuck there.

    While is useful for sorting like (excuse the simplicity but hopefully you get the idea)..

    sorted = FALSE

    While NOT sorted

    ..Sort through hiscores

    ..If hiscores are in proper order then sorted = TRUE

    While End

  • procras get's it right

    I think you may have take the reference of "while" a little too literal in reference to the English language. While while() does make some sense in what you want. It's not used correctly.

    Use a while loop when you need compare condition. Also again procas is right. C2 has other caveats that allow development without a while loop. As a programmer I haven't used one yet in C2 though I have been tempted :D

    so yes. "While your in collision do this" which is what you have. The while goes into a loop until false. As your object is now in a true condition. It then does your action and THEN it checks to see if the condition is true again. Which it is because your object is still in collision. Then it does the action, then checks the condition.. so on infinitum.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks!

    I finally able to achieve desired result! Found invert function )

    New versions of construct get me confused some times, so do the old ones )

    So this is my result:

    <img src="" border="0" />

    Hopefully my english not so weird as google translate says, thx again!

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