Increasing speed of the enemies every x seconds

0 favourites
  • 7 posts
From the Asset Store
Like tourists, Travel around the world as fast as you can!
  • Hey,

    I'm creating this very simple "avoid the falling enemies or die" game.

    Currently I am stuck with creating an algorithm that will make the enemies fall progressively faster, thus making it harder for the player to avoid them. The idea is to start slow and make the game harder every 10 seconds. I am very new to construct so my noob friendly experiment with creating a system event that says every 5secs / set speed to 500 did not work. I tried with subevents, creating new objects, but no luck. I am sure this is fairly easy to achieve but regardless, any help would be nice.

    Cheers! :)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You have to use a (global) variable. You can call it enemyspeed for example.

    Then you have to use "add to" instead of "set value". Because you dont want to set the speed always to 500. You want to increase it by 500.

    It should look like:

    Every X seconds - add to- enemyspeed - 500

    You can also set a timer at the beginning of the layout, repeating every 5 or 10 seconds. Then instead of "Every X seconds" you can use the Timer condition.

  • Hm, how would I incorporate this into a bullet behaviour mechanic?

  • Instead of "add to" you choose the object, than search for "set speed" under the bullet tab. Than you write bullet.speed+500 where bullet is your object name.

    If you want the bullets to become faster.

  • I think I got it.

    I do believe I need some tweaking though, it occurs while there are already other "enemies" on the board, therefore, the player feels a bit of inconsistency.

    Any thoughts on that. I thought about adding a full screen Particle effect that would stop the animation and once finished start it all over again + 10 speed of course.

  • don't forget about delta time

    You can do: Sprite | set bullet speed to: sprite.bullet.speed+10*dt

    this way sprite will accelerate by 10 every second.

  • I made it work :)

    What I did was I created a global setting called globalspeed. Then, I set the game to create an object every x seconds. Objects had bullet behaviour. Therefore, their set speed was globalspeed (which was previously set to 300). After that, I put in another system variable where I ordered the game to count to 30 seconds and then kill all the enemies, create particle effect and immediately increase the speed to + 30.

    Works like a charm

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