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 create a bonus every random enemies destroyed?
Make a global variable and name it bonus:
On Enemy destroyed => add random (5,10) to bonus
Develop games in your browser. Powerful, performant & highly capable.
Actually I mean more of a power-up rather than adding points to the score. The title I used for this topic is kind of misleading, sorry.
You can do something like this:
On enemy destroyed random(10)<1 : Enemy spawn PowerUp[/code:2ro2445l] Every time an enemy is destroyed, there will be a 10% chance to drop a power up.
On enemy destroyed random(10)<1 : Enemy spawn PowerUp[/code:bu872ehy] Every time an enemy is destroyed, there will be a 10% chance to drop a power up.
How exactly is this entered in an event sheet? Does it involve the random instance of an Enemy? I just tried to enter this into the 'Vertical Space Shooter' template and I don't understand.
Enemy-> On destroyed (press B to add a sub-event) System -> Compare two values -> random(10) is less than 1 : Enemy -> Spawn PowerUp[/code:2wzdw65n]
Enemy-> On destroyed (press B to add a sub-event) System -> Compare two values -> random(10) is less than 1 : Enemy -> Spawn PowerUp[/code:w4zzx50r]
Yup. That's what you meant. Thanks.