How do I reset object spawn timers on layour restart?

0 favourites
  • 2 posts
From the Asset Store
Hand-painted tiles, objects, animated objects, and background to build a colorful Mayan civilization environment.
  • i have set my game to:

    System_Every (5) seconds - System_CreateObject (Data) on layer 0 at (random(224, 640) , random(96, 348) )

    The problem is, when i die, i have made a retry button, it restarts the layout, but... let's say it will take 5 more seconds untill the next data appears, i die after 2 seconds, and retry, but this time the data only takes 3 seconds to spawn.

    So the timer doesnt restart, this is a big problem since i have also made it to spawn a spawner every 25 seconds, and that could fu*k up the player if it spawns instantly

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • System every x seconds starts counting from the start of the app..

    As resetting the start of the app isn't possible, you could for example add a wait-period at the start of layout before activating the event..

    Another way would be to use timer behaviour instead of the every x seconds, or just add 1 to a global variable (which you can reset before restarting) every second and have the actions performed when variable%5 = 0..

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