Infinitie runner obstacle help

Hi everyone,

I am having a small problem when it comes to my obstacle spawning. The obstacle(a rock) the player must jump over,are spawning too close together. How can I make the rocks spawn a minimum distance away from each other?

My obstacle spawner rules are in the image below

Comments

  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772
    Change the .2 in your timer to .5 or 1 or something higher.
  • joshiwujoshiwu Member Posts: 207
    @bobtheturtle crash course you ! A rule is (as you may know)
    If
    then
    Else

    But in a case like this you can double layer.
    If
    then
    else if
    then
    else

    so : If game.timeplaying >= 200.00 then(timer(every .5)
    Elsif game.timeplaying >= 100.00 then(timer(every 1.5)
    Else (Timer(every 3)
    OR
    Timer(every 4/game.difficultylevel)

    So as difficulty increase, Obs. spawn more frequently. CLick insightful Brajmahal.
  • joshiwujoshiwu Member Posts: 207
    keeping in mind you need to create game.timeplaying or game.difficulty and rules to calculate those real numbers.
  • SocksSocks London, UK.Member Posts: 12,822
    I am having a small problem when it comes to my obstacle spawning.
    You can simplify your rules a little, I know this doesn't answer your question, but you've no need for two timers (timers eat processor cycles), one is firing every 0.1 seconds, but the output of this timer is only being checked every 0.2 seconds . . . . try this instead, it will give you the same thing:

    image
    How can I make the rocks spawn a minimum distance away from each other?
    Increase or decrease the 'every' value in the timer.
  • bobtheturtlebobtheturtle Member Posts: 226
    Thank you everyone! And especially Sock for the example code. :)
Sign In or Register to comment.