How do I make powerups? (bullet damage)

Get help using Construct 2

Post » Sun Oct 01, 2017 12:17 am

I'm trying to make it so that once I get a powerup, my bullets do more damage to enemies. I'm not sure exactly how to do that. If I need to use global variables, how would I go about doing that? Any help would be appreciated.
Posts: 1
Reputation: 202

Post » Sun Oct 01, 2017 1:08 am

There are several ways to do it.
Probably the best would be adding "damage" instance variable to bullet object. When the bullet is fired (spawned) set a value to this variable. For example, without the powerup your bullet.damage=10, with powerup bullet.damage=20
When the bullet hits an enemy, substract bullet.damage from enemy's health.

As for the powerup itself, this also can be an instance variable on your character object, or a global variable.

Did I help to fix a problem in your game? You can buy me a cup of coffee :) If you'd like to hire me, please see this post
Posts: 2,375
Reputation: 84,377

Return to How do I....?

Who is online

Users browsing this forum: facecrime and 10 guests