How do I use a random to...?

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

    i seen some vids on youtube but what i want is not the random or the choose..

    i want something to spawn a sprite in for example (5,10) (10,20) (45, 80)... and so on... it needs to be those specific points .... seems that with choose it will randomly do like (5,80) when i do not want that :/ hope you can help

    Ty xxx

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • There are a few ways you can accomplish this.

    If the points are very specific, for example set by hand, you could use an Array or spawner sprite.

    • The Array Way

    -The spawner object way

    The spawner object is easier, but more resource intensive. You simply put the spawner objects where they need be.

    You could also use math, by taking into account the first random generated number to generate the second, but it all depends on what you want.

    If this doesn't make sense to you or if you wanted to place the sprites yet another way, let me know.

  • ye... like i want to click on the object.. and spawn it in a random place but it needs to be in one of 5 "boxes"... not sure thats the way of doint it

  • tyyy i did here's how i did it

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