Making a Powerup

1

Stats

4,539 visits, 7,098 views

Tools

License

This tutorial is licensed under CC BY 4.0. Please refer to the license text if you wish to reuse, share or remix the content contained within this tutorial.

Published on 24 Jun, 2012. Last updated 19 Feb, 2019

Making a Powerup

Step 1: The Basics

Have you ever wanted to have a powerup that gives you a certain ability? Then you need a few basic things...

1. A sprite. Always have a sprite.

2. The "Solid" or "Platform" behavior ("Solid" for stand-still health potions or "Platform" for 1-up mushrooms.)

3. A collision mask (only for "Platform" behavior."

When you have those, you can start.

Step two: The Logic

First, your simple health drop:

Now we want to make the player pick up the drop, so we do this:

1.Create an Instance variable for the player and name it "health."

2.Create something that can damage the player and an event (If PlayerBox collides with Enemy>Subtract [Amount of health taken] from player.health)something-or-other.

3.Create the event for the powerup (if Player collides with HealthDrop>add [amount of health given] to player.health & destroy HealthDrop) more or less.

Now you have created a powerup! Also, for moving powerups, use the "Simulate Control" action. Good luck!

  • 0 Comments

Want to leave a comment? Login or Register an account!