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
So I want to spawn enemies every 3 seconds ( which i know how to do ) but how do i spawn random enemies. So I have 3 different enemies, how do i spawn different one from the same spawn ( it must be the same spawn )
Thanks in advance.
You would have to have a number represent each enemy and have a global variable that holds a random generated number to choose which one to spawn. Then have a event for each possible number to tell it which one to spawn.
Develop games in your browser. Powerful, performant & highly capable.
I would use local variable instead of a global one, because You only need it to spawn some objects on specific event and there's no need to have it available for entire project.
You can also put the enemies into an "Enemies" family and pick them randomly either with the "pick random instance" expression or using the the "pick by evaluate" expression and a Family variable.
See attached file.
Yes local not global. I didn't recommend families cause they don't have a license from their profile info. Which isn't available in the free version.
Thanks, that really helped.