How do i spawn objects at a specific time (without using 'compare time')

0 favourites
  • 2 posts
From the Asset Store
Time rewind like in "Braid". Choose objects that will be affected by time rewind
  • Howdy! Well, i'm trying to make a simple rythm game, spawning bullets at a specific time (the music beat) using a variable 'Timer'

    [Every 0.1 seconds - Add 0.1 to Timer] (or) [Every Tick - Add dt to Timer]

    [If Timer = 8.7 - Create bullet on layer at x,y]

    The timer is working but the objects are not spawning, i tried to:

    [Every 1.0 seconds - Add 1 to Timer]

    [If Timer = 8 - Create bullet on layer at x,y]

    And it worked but is not synced with the music because the object needs to spawn at 8.7... (Sorry about the bad english)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • When you are dealing with floats your variable can become something like 8.6999999999998 instead of 8.7

    So try using "Is between values" event:

    "Timer is between 8.69 and 8.71"


    Also, instead of this timer variable you can use time expression - The number of seconds since the game started, taking in to account the time scale.

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