How To Switch Character As A Proper Power Up?

Discussion in 'How Can I...?' started by Jesse O'Brien, Jan 15, 2020.

Tags:
  1. Jesse O'Brien

    Jesse O'Brien Boxer

    Joined:
    Jan 15, 2020
    Messages:
    10
    Likes Received:
    0
    Hi guys, I'm working on my first Buildbox game and loving it so far, but finding some specifics to be difficult. The first problem is a proper power up - I can find info on how to switch a simple sphere to a cube when the character hits an object, but that's too simple for what I need. Imagine Mario when he hits a mushroom. He doesn't just switch to a new static cube or sphere - he gets a whole new character with new sprites, new abilities etc. It seems I can't ever switch out my main character.

    Similarly, I'd like my character to be able to walk up to a slingshot element, and when he touches it, the player now has slingshot control. Kind of like accessing a gun turret and then being able to walk away as normal. Is any of this possible? Thanks in advance. :)
     
  2. Tars Tarkas

    Tars Tarkas Avid Boxer

    Joined:
    Jul 17, 2018
    Messages:
    303
    Likes Received:
    228
    Maybe you could try removing the character on collision and spawning the new one.
    I don't know if this will work.
    Also you could try the state machine
     
  3. Hanomax

    Hanomax Avid Boxer

    Joined:
    Aug 24, 2018
    Messages:
    157
    Likes Received:
    85
    Power-up character change example: https://www.hanomaxgames.com/Downloads/platformer3.bbdoc
    Keyboard keys are not working in this case, as they have no enable/disable option.
    So, when moving with UI buttons, you can destroy box like in Super Mario game, and it drops gun. After that, it switches over to second set of animations.
     

Share This Page