How do I generate random cercles with the same behavior

  • Hi, everyone.

    i'm recently working on a game (my first one) i want to publish on android, it consists of colored cerles (two colors red and blue) generated randomly, moving top down (bullet behavior), you click on a cercle and some actions occur. but that's not the problem. my problem consists of generating those cercles randomly in the top of the screen, and once the're there they move top down (bullet behavior). how can i do this ?

    an image of the concept of the game:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • for the X system create object at random(layoutWidth)

    for the Y it depends how far from top you want to spawn just play with numbers

  • thank you Fidasx, it worked

  • for the X system create object at random(layoutWidth)

    for the Y it depends how far from top you want to spawn just play with numbers

    still have one problem.

    this is the code:

    and this is the result:

    it put the squares on the top of each other,

    i want them seperated and random: not red blue red blue red blue...

    how can i do it ?

  • You should make it one object with two frames/frame speed Zero. the make a on created event setframe random(2). then use the code you already have but i think you have to increase the -y ALSO DEPENDing on speed you might need to increase time between spawn or speed they travel

    edit made it for you

    [attachment=0:3qiyczln][/attachment:3qiyczln]

  • try this

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