Non-overlapping random spawn

This forum is currently in read-only mode.
From the Asset Store
Easily generate many levels from a set of pre-built scenes (Construct 3 template)
  • Hi there,

    There's an area with multiple image points. How can I make it spawn new sprites at random image points over time so that these sprites do not overlap each other (i.e., appear at the same point)?

    Thx in advance.

  • bump

    Using this post, and because I need something similar but I cant find the right logic:

    How do I make a random spawn of 4 numbers in 4 different but fixed positions without repeating themselves?

    In other way I want them to spawn in a,b,c and d positions randomly but never overlapping.

    I found a rudimentary way to do it with a "set position" x=CHOOSE(128,384,640,896) and every time they overlap its forced to choose another place to be. This repeats 4 times for each number. It works but it seems very badly done. It brings me further problems when I want 10 numbers in 10 random fixed positions... its huge!

    I have this feeling that this is done with an array, but I don't know how to use it here.

  • You want to create 1 object per position or just don't want to repeat the last position?

    Anyway I try to make a cap, maybe it's not the best method but I use array to achieve this.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • How do I open your .cap file?

    My Construct2 does not accept it...

  • Pmmm, You need to install construct classic to look at the cap. You are in the construct classic section which is different than the construct 2 section.

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