How do I Limit Spawn Time?

Get help using Construct 2

Post » Wed Mar 25, 2015 9:51 pm

@fragfather but every so often the enemies seem to overlap each other?????
B
3
Posts: 36
Reputation: 253

Post » Wed Mar 25, 2015 9:51 pm

@piszozo it says I needa reputation off 500 before sending a private PM :/
B
3
Posts: 36
Reputation: 253

Post » Thu Mar 26, 2015 1:07 am

@FragFather I ran it again and it seemed to be fine. I change the maximumSpawnTime to 6 instead of 5 since at 5 the enemies like you said spawn at 1,3 seconds. So I thought it could further be made difficult by spawning every 0.5,1 or so. So I played around adding 6 which I think was too much since this time they overlapped a lot since 6 is too high I guess, so what can I do to reduce it to 0.5,1 spawn rate???

P.s thanks so much. Think I finally made progress :D
B
3
Posts: 36
Reputation: 253

Post » Thu Mar 26, 2015 11:42 am

I hope it helped what I sent, I am glad you solved it :)
B
22
S
5
G
2
Posts: 210
Reputation: 3,377

Post » Thu Mar 26, 2015 1:41 pm

@davidross900
If you change MaximumSpawnTime to 4.5 instead of 5 your resulting spawn speed will be every 0.5 seconds (5 -spawnTime = 0.5 where spawnTime = 4.5). Just takes a little basic algebra.

I hope that helps and good luck with your project.

[Edit] just to be clear, you would change your Set spawnTime method to:
spawnTime = min(spawnTime + 1, 4.5)
B
38
S
12
G
11
Posts: 331
Reputation: 7,712

Previous

Return to How do I....?

Who is online

Users browsing this forum: Carlafnt, Forioga, jhendy, the_Shit_hawk, Yahoo [Bot] and 7 guests