How do I Place Objects away from each other

Get help using Construct 2

Post » Sat Sep 12, 2015 9:46 am

I have six objects that are created in the layout at random times at random positions. Most of the time they are away from each other means not touching each other, GOOD. But sometimes they are created in a way that one object is touching one or two other objects. So is there a way to make sure that none of the object touch each other when created.
B
4
Posts: 12
Reputation: 226

Post » Sat Sep 12, 2015 1:43 pm

a starting point for you...

https://goo.gl/KsCFC5
August 2015 - I misplaced a lot of links - I will try to find backups and repost. If You find a post that interests please reply to post with @rampackwobble and I will get a nudge!

If you find my posts useful please consider donating something to a local charity or to the http://www.mndassociation.org/
B
64
S
34
G
47
Posts: 1,194
Reputation: 30,882

Post » Sat Sep 12, 2015 4:43 pm

After spawning the object put a sub event

Conditions:
While
Object is overlapping object
Pick 1 instance of object
(You can find this condition under the picking category)

Then you just set the object's position to a random position.
This will randomize the object's position until its no longer overlapping any object
Banned User
B
6
S
3
Posts: 105
Reputation: 1,170


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 27 guests