How can i implement a power up system when I have a power up controller?

I was wondering if the power up system can be done via a proxy, or multiple game objects etc. But i dont know what is the best approach?

You need to be more specific. What kind of game are you creating? What kind of powerups?

One of those old zelda-like games like the 90s version, with powerups such as speed_boost, attack_boost and health_regen

If the player is able to pick up powerups then yes, these should be game objects which the player can interact with on the map, but once they are picked up they should be dealt with by your game logic as flags or counters in your player script or in a power up Lua module. If you are uncertain of how to proceed I think you need to break down the system and describe each thing in detail.

  • Is it a fixed speed boost or will there be multiple levels?
  • Is it permanently available once picked up or is it a single or multi use boost?
  • Is it always active or trigger by the user? If trigger by the user, how long is it active?

Once you know the answer to these questions you can start coding the logic.

1 Like

It is not fixed and it is a multi-use boost and triggered by the user which is active for 10 seconds