Hundreds of features to explore
Games made in Construct
Your questions answered
Popular & trusted by schools and Universities world-wide
Construct 3 runs in the browser & works offline
Students do not need accounts with us
Our educational partners
Free education resources to use in the classroom
World class complete documentation
Official and community submitted guides
Learn and share with other game developers
Upload and play games from the Construct community
Game development stories & opinions
How do I spawn 2 or more enemy randomly on surface of land every x second,
this is the picture
The easiest way to do this is to put a bunch of invisible sprites - SpawnPoints.
Then you can do something like this:
Every 2 seconds
Repeat round(random(10,15)) times
System-> Pick random instance of SpawnPoint : SpawnPoint spawn Enemy
This code is not very good because the same SpawnPoint may be selected several times and spawned enemies will overlap.
A better solution would be adding Timer behavior to SpawnPoint. Each SpawnPoint instance will be running its own timer and spawning enemies on timer event.
You can also add a condition to check if there are other enemies within X pixels from the SpawnPoint before spawning a new enemy.
so sorry, really dont understand , i try to find in menu, and dont find what you said.
i only can make every 2 second,
i did this, and nothing happened
this the ss
Develop games in your browser. Powerful, performant & highly capable.
Here is a demo:
https://www.dropbox.com/s/lgjr9t2nck4b2 ... .capx?dl=0
And another one with several different methods of spawning:
https://www.dropbox.com/s/0jptlam49u7ug ... .capx?dl=0
thanks you so much dop2000 for the idea