How to make powerups

How do I make a powerups?

2 Likes

When the player collides with an object (the power up) make the behaviors inside do something

3 Likes

W o w
Great explanation :joy:

If you want me to provide an example, I can hop inside The Thunderdome real quick and make an example on how to code a powerup :upside_down_face:

3 Likes

you would need to break it down into components:

  • collection of the power up

You would probably have an object to collect, and use the collide behavior to detect if the player hits it. Then you would need to let the player know that the power up is collected by sending a message. Finally, you would want to destroy the power up.

  • code for when the power up is activated

For example, a speed boost. The magnitude for movement could be changed when it receives the power up message

  • timer for the power up to wear off

When the player receives the power up message, start a timer that will reset to the original speed when done.

This could be too broad or too specific for what you want to do, but a general tip for making game mechanics is to break it down into different components that need to happen to make it work. For example,
I want the player to go over a power up object and then gain a temporary speed boost.
Break it down into the collection, the actual power up, and the timer to make the power up temporary

4 Likes

mmm, yes. BOARD.
image

5 Likes

Thanks! this will be usefull

Your welcome : p

I thought u were long gone lol