How to make upwards jumping platform game

GLGAMESGLGAMES SingaporeMember Posts: 988
edited November -1 in Working with GS (Mac)
Hi guys,
yet another project i am going to start, since the first few all had some hiccups along the way :(
Just want to find out how is it possible to have recycled platforms spawning in random position but upwards and not overlaping each other?

Comments

  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    i would have the platforms set up at the starting positions.

    have move rules in them going up relative to scene

    have a rule when self position y is greater then or equal to 480

    change attribute self position y to 0, and change attribute self position x to random(0,320)

    youll prob have to adjust the numbers to your likeing, thats how you would do it though

    cheers
  • GLGAMESGLGAMES SingaporeMember Posts: 988
    Yes i understand that will work is there's only 1 platform per level, but for example if at y = 50 i wish to spawn more then 1 platform at random x value and dun wish for them to overlap, how can that be done? or i can only choose to use one platform per y value?
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    that will work for as many platforms as you want. Putting a collide behaviro in them to collide with themselves should stop them from spawning on top of each other

    cheers
  • GLGAMESGLGAMES SingaporeMember Posts: 988
    You mean whenever 2 of them collide then reposition with another with another x value?
Sign In or Register to comment.