HEllo ^..^

Get help using Construct 2

Post » Wed Feb 20, 2013 11:47 pm

I want to increase the number of enemys that spawn every minute so how do i do this. I think it starts witn COndition: System: Every 60 seconds. Then i get lost what can i add in the actions to make its so that every 60 seconds the enemys spawns an extra enemy. Right now enemys spawn every 1.5 seconds for 10 minutes. I basically wanna increase the challenge every 60 seconds,Every 60 seconds increase the enemy spawn by 1. So instead of spawning 1 enemy every 1.5 seconds throughout the game which will stay how do i put it so that every 60 seconds the enemy spawn increases by 1 is that possible.
Posts: 8
Reputation: 291

Post » Thu Feb 21, 2013 2:26 am

Hello! I think what you're looking for is a variable. Set a global variable like "spawnrate" to 1; this should indicate the # of enemies that spawn when the event is triggered.

When the timer is up to spawn an enemy, repeat the event a number of times equal to the "spawnrate" variable. This way, you can modify the "spawnrate" variable on the fly and the system will always reference it when enemies are created.

So when you want to increase the challenge, have the System>every 60 seconds event increase the "spawnrate" variable by 1.

To create a global variable, just right click on the event sheet and add a global variable. When you want to modify it, use the System action and you should see a section with the global variables listed (set value, add to, subtract from, etc).

As a design tip, I find it easier to create a separate event sheet named "variables" or something like that and store your global variables there. The layouts don't need to have the event sheet set to use, since global variables are accessible at any time.
Posts: 152
Reputation: 3,764

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 32 guests