How to spawn a single object for each collision?

Get help using Construct 2

Post » Mon Jan 12, 2015 1:01 pm

My problem: When the player (green box) comes within the collision field of some gold mine (big yellow circle), works perfectly, however only works when there is one player. When there is more than one player in the same collider it works as if there is only one player. And this can not be so that the players are then the more collectors you create, more gold can be collected...

Hope you understand my poor English...
Here is some pics:

Image
Image

If you prefer, a link to the "game": caiokawasaki,com/trash/construct/001 (change the coma for a dot)
B
3
Posts: 6
Reputation: 187

Post » Mon Jan 12, 2015 3:20 pm

Try this...

multiple-collectors-example.capx
You do not have the required permissions to view the files attached to this post.
Bruno

I like to eat, but I'm no cook. Why liking to play games would make you a game designer?
B
15
S
3
G
1
Posts: 329
Reputation: 2,012

Post » Mon Jan 12, 2015 3:32 pm

I think you want a "for each" condition.
Click "GoldMine -> Is overlapping player"
press "C"
Double-Click "System"
"For Each"
choose "Player"
How does that work for you?
B
11
S
4
Posts: 152
Reputation: 1,236

Post » Mon Jan 12, 2015 3:56 pm

Unnatural20 wrote:I think you want a "for each" condition.
Click "GoldMine -> Is overlapping player"
press "C"
Double-Click "System"
"For Each"
choose "Player"
How does that work for you?


Have try it and things get very weird:
Image
Here is the result: caiokawasaki,com/trash/construct/002 (change the coma for a dot)

It spawn's a lot of "gold"...

Then i have tryed this:
Image
Here is the result: caiokawasaki,com/trash/construct/003 (change the coma for a dot)

And it works, but there is a problem. Both "gold" go just to one collector, now the question is: How do i make the "gold" go for each collector?
B
3
Posts: 6
Reputation: 187

Post » Mon Jan 12, 2015 4:09 pm

Well a .capx would help alot lolz. Maybe just make a smaller .capx with that part. If ur afraid someone is gonna take ur idea.
B
8
S
1
G
1
Posts: 96
Reputation: 632

Post » Mon Jan 12, 2015 4:38 pm

david7457 wrote:Well a .capx would help alot lolz. Maybe just make a smaller .capx with that part. If ur afraid someone is gonna take ur idea.


@brunopalermo example worked like a charm! Now I think just need something to stay cool, I like it when the gold was released, he went to a random direction and after 0.5 seconds he was toward the collector. Is this possible?

Here is the .capx: caiokawasaki,com/trash/construct/capx/construct01.capx (change the coma for a dot)

And a pic if you want:
Image

And here is a live preview: caiokawasaki,com/trash/construct/004 (change the coma for a dot)
B
3
Posts: 6
Reputation: 187

Post » Mon Jan 12, 2015 4:49 pm

Done!

construct01.capx
You do not have the required permissions to view the files attached to this post.
Bruno

I like to eat, but I'm no cook. Why liking to play games would make you a game designer?
B
15
S
3
G
1
Posts: 329
Reputation: 2,012


Return to How do I....?

Who is online

Users browsing this forum: Ryan Kocourek, Yahoo [Bot] and 14 guests