How do I spawn random sprite not on top off..

Get help using Construct 2

Post » Fri Feb 28, 2014 5:35 pm

Hi

At random x seconds create object at y random x. But i dont want the objects to be created on top each other. How can I do this?
B
2
Posts: 14
Reputation: 245

Post » Fri Feb 28, 2014 5:41 pm

How you want them to be created?
B
14
S
3
G
1
Posts: 255
Reputation: 2,027

Post » Fri Feb 28, 2014 6:00 pm

Okey, here it is.

I have. System> Every random(0,3) seconds > System>create object car on layer 1 at (random(104, 497), -137

That's cool, i like how they are created, but sometimes they are created on top of each other.

I want the create event to check, if object car is created on random X, create at another X. So when the object is created, its not created so it will overlap previously created object.
B
2
Posts: 14
Reputation: 245

Post » Fri Feb 28, 2014 6:16 pm

Use some detector before spawning them.
https://dl.dropboxusercontent.com/u/26932498/howto/random_spawn/spawn_notoverlap.capx

edit: And don't forget to set the detector's opacity to 0.
B
24
S
9
G
2
Posts: 294
Reputation: 3,160


Return to How do I....?

Who is online

Users browsing this forum: Yahoo [Bot] and 10 guests