reset every X seconds timer

0 favourites
  • 2 posts
From the Asset Store
Tabata timer
$9.99 USD
Template for Tabata timer, fully documented in comments and video
  • Hi,

    I have event sheet that is included in the event sheet of multiple layouts.

    In that event sheet i have a for X seconds loop that spawns an object.

    Lets say the loop is for 10 seconds.

    If I move from layout1 to layout2 after 5 seconds

    then after another 5 seconds an object will be spawned on layout2.

    How can I reset it so it will be after 10 seconds again?

    thanks.

    edit:

    just thought about something.

    does C2 create a timer for this condition?

    or is there a global game counter and it uses it?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I think it uses the global time of the game yeah.

    so you would need to use a global Variable timer

    and in your included event sheet

    Gobal number timer = 0
    +System: On start of Layout
      -> System: set timer to 0
    +System: Every tick
      -> System: add dt to timer
    +System: timer >= 5
      -> System: Create Sprite
      -> System: set timer to 0
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)