Help me understand why ForEach isn't working.

Not favoritedFavorited Favorited 0 favourites
  • 3 posts
From the Asset Store
Game with complete Source-Code (Construct 3 / .c3p) + HTML5 Exported.
  • Why doesn't the text change every x seconds as defined, and why does it always remain with the last displayed value?

    [project]https://drive.google.com/file/d/10hsX9HCe99bcc0PxXaDqd75NdYCqvqCu/view?usp=drive_link[/project]

    Tagged:

  • Why doesn't the text change every x seconds as defined, and why does it always remain with the last displayed value?

    https://drive.google.com/file/d/10hsX9HCe99bcc0PxXaDqd75NdYCqvqCu/view?usp=drive_link

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You're using wait wrong - wait only delays the actions, not the event. So each sprite gets looped through on the same tick (instant) and they're all waiting the same 2 seconds, and setting the text all on the same tick again then.

    Try using 'every x seconds' with an incrementing variable instead, picking by IID from 0 to object.count while the variable is less than object.count.

    Or try the timer behavior, you could still use a for each loop, setting the duration for each timer/instance to loopindex*2 seconds, and setting the text on timer triggered.

    Wait is super commonly misused and the name is misleading. If it were up to me I'd call it "delay actions" or "postpone actions" instead.

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