How do I change random expression over time?

0 favourites
  • 9 posts
From the Asset Store
Easily generate many levels from a set of pre-built scenes (Construct 3 template)
  • Hello everyone!

    I hope you can help me on this one.

    I'm creating an object every random time of 5 an 10 sec. "System-Every Random (5,10) seconds".

    What I need is after 20 seconds the random time goes to 1 and 5 seconds, and so on.

    How do I do it? I hope you can help me.

    Best!

    Tuca

  • Set a Global variable n and instead of using

     "System-Every Random (5,10) seconds"[/code:30bx26nm]
    
    use
    
    [code:30bx26nm] "System-Every Random (n x 5, n x 10) seconds"[/code:30bx26nm]
    
    Then every time you change the Global variable your randomness changes accordingly.
    
    Hope I explained that correctly
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi BigFrank,

    Thank you for your reply. It makes perfect sense!

    But for some reason I can't get it to work properly. Is it possible for you make a simple capx with this? The object has a bullet behavior.

    Thanks in advance,

  • Hmm, I roughed out a capx for you but I don't seem to be able to upload a file on this forum. I probably need a higher rep or post count or something like that.

  • I've sent it to you by email. You should wait until the spawnDelay hits "0" - that's when it gets funny!

  • Wow, that's perfect bigfrank!

    Thank you so much for your help, This was exacly what I need!

    All the best!

  • I've sent it to you by email. You should wait until the spawnDelay hits "0" - that's when it gets funny!

    Aw, c'mon. I want to see!

    I'm still confused about the random events. Can somebody create a video example of how all of the separate 'random' commands work with regards to any kind of object it can be applied to?

    Obviously I'm begging for a full video manual, LOL.

  • Here it goes:

    https://www.dropbox.com/s/5l6v5ntqj5ljv7g/spawnDelay.capx?dl=0

    Credits to BigFrank.

  • Hehehehe, now that's what I call a SPAWN!

    Edit: I just ran it in debug mode and at 0 spawnDelay there's up to 395 objects on screen

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