Jump to content

Generated platform - each must be in position before the next


Jirka1111
 Share

Recommended Posts

Hello, my question is very simple. I have 10 platforms (each has different length) and I want them to run to the middle of the screen. But every platform has to be on that position before the next one. And each platform must be on its position before the previous. Generated position is random (between 100 and 1000 velocity).

Link to comment
Share on other sites

I'm not sure I understand completely, but if you are looking to place 10 platforms back to back to cover the whole distance between two fixed endpoints, then you could generate just the 9 random numbers in that range, where a platform ends and another begins. Just make sure to sort them :-)

Link to comment
Share on other sites

I'm not sure I understand completely, but if you are looking to place 10 platforms back to back to cover the whole distance between two fixed endpoints, then you could generate just the 9 random numbers in that range, where a platform ends and another begins. Just make sure to sort them :-)

Thank you, szocske, I wrote that before I went to bed so probably you cant understand my question. I had draw an explanation picture of what I meant.

 

http://imgur.com/tXgmQ9u

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...