Loops doesn't work as expected...

0 favourites
  • 5 posts
From the Asset Store
_______ Huge collection of metal fixtures ________
  • Hello everyone, I have some trouble understanding the Loops, I dont understand why when I configure the loops to run 2-3 times they executes for infinite times...

  • Unless it is a trigger event, the event will run constantly (every tick), this is the case with loops. You can add a trigger once condition to the loop to make it run once, or trigger one time by some other method, for example if you added those loops as a sub event to the top condition 'on start of layout' they would only run once.

  • The way you have it set up the loops are executing every tick, so effectively all the time.

    If you want a loop to only happen after something else takes place, you should place it as a sub event of either:

    1) A block of conditions you want to be met before the loop executes

    2) A trigger condition

    In your example try placing the the loops you have as a sub event of the On start of layout trigger.

    Doing that will cause them to only run once, in this case, when the layout starts.

  • If I put a repeat or for loop in a sub event they only run only 1 time...I really dont understand ..

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You are creating 3 objects on top of each other at the same co-ordinates, you can check in debug view there will probably be 3 instances of the sprite.

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