Spawning Problems

Get help using Construct 2

Post » Fri Jun 01, 2012 8:24 pm

Hello, I'm having problems with my game and the spawning. I'm going to include a screen shot of my problem along with the .capx. Basically, at the beginning of the layout, I have a for loop that generates 10 platforms and random positions. However, the problem is some overlap each other. How would I fix this?

Thanks

.capx

http://dl.dropbox.com/u/78257325/Climb.capx

photo

http://dl.dropbox.com/u/78257325/problem.png
B
12
S
2
Posts: 41
Reputation: 1,553

Post » Fri Jun 01, 2012 8:45 pm

[code]+on start of layout
-> spawn platform at random(layoutwidth),random(layoutheight)
+platform: [invert] is SET
    +while
    +platform: is overlapping object
      -> platform: set position to random(layoutwidth),random(layoutheight)
    +[empty]
      -> platform: set SET to true[/code]
put your platform in the family 'object'
and add a boolean variable 'SET' with default false
B
60
S
22
G
14
Posts: 1,479
Reputation: 16,346

Post » Fri Jun 01, 2012 9:24 pm

Hi Yann thanks for your reply,

Could you possibly post an example of the method that you stated above?

I'm not use to families yet.
B
12
S
2
Posts: 41
Reputation: 1,553


Return to How do I....?

Who is online

Users browsing this forum: GSquadron and 27 guests