How do i limit spawning objects

Get help using Construct 2

Post » Sat Jul 19, 2014 12:03 am

So right now i have
system > Every 1 second
System > pick random instance spawn
System create object Monster on layer 0 at floor(random(x,y)) , floor(random(x,y))

How do i make it stop spawning after a certain amount has been spawn?
B
6
S
1
Posts: 38
Reputation: 662

Post » Sat Jul 19, 2014 12:13 am

Check Sprite.Count
ImageImageImage
B
71
S
21
G
221
Posts: 3,651
Reputation: 124,231

Post » Sat Jul 19, 2014 12:29 am

i dont quite understand.. :C
im still new to construct 2 can you please explain?
B
6
S
1
Posts: 38
Reputation: 662

Post » Sat Jul 19, 2014 12:51 am

add a sub-event for 'every 1 second'
"system -> compare two values -> monster.count, less or equal, (the limit of its amount you want)

so this means system will only spawn that object if its count is less or equal than your determined amount
B
18
S
2
G
1
Posts: 67
Reputation: 1,329

Post » Sat Jul 19, 2014 1:21 am

Message: bubblesteam can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
okay i tried that but it doesn't work
i don't know if i did that correctly
here's a screen shot.
http://imgur.com/HJBvPA7
B
6
S
1
Posts: 38
Reputation: 662

Post » Sat Jul 19, 2014 1:25 am

you did the "compare two values" event false. the think you did is "greater or equal". change it to "less or equal"
B
18
S
2
G
1
Posts: 67
Reputation: 1,329

Post » Sat Jul 19, 2014 1:33 am

Message: bubblesteam can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
okay i i changed it but it still doesnt limit the spawning.
Heres my capx
http://bit.ly/1qlFTfy
i feel really confused at the moment sorry :/
B
6
S
1
Posts: 38
Reputation: 662

Post » Sat Jul 19, 2014 1:44 am

My bad, sorry

Make "compare two values" like this, not as a sub event

it should work fine now
You do not have the required permissions to view the files attached to this post.
B
18
S
2
G
1
Posts: 67
Reputation: 1,329

Post » Sat Jul 19, 2014 1:48 am

Oh WOW thanks alot it worked!
B
6
S
1
Posts: 38
Reputation: 662

Post » Sat Jul 19, 2014 1:50 am

You're welcome. Good luck.
B
18
S
2
G
1
Posts: 67
Reputation: 1,329

Next

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 1 guest