End Game When Character Gets To A Certain Size

Discussion in 'How Can I...?' started by chrissy_wissy2, Sep 6, 2020.

  1. chrissy_wissy2

    chrissy_wissy2 Avid Boxer

    Joined:
    Oct 21, 2015
    Messages:
    161
    Likes Received:
    72
    Hi all. Does anybody know how to end the game when a character scales to a certain size in bb3? At the end of my levels I have a bonus scene and I have added a scale animation so it gets smaller as it goes along the path but I want the game to end when the character scales down to a certain size. Basically the bigger the character gets the longer it can go along the path.

    Cheers
    Chris
     
  2. Josh (Nology Games)

    Josh (Nology Games) Avid Boxer

    Joined:
    Nov 27, 2017
    Messages:
    200
    Likes Received:
    155
    Depending how it is set up, you should be able to connect an event node to the “done” link. But if that doesn’t work, I may need a little more information.
     
    chrissy_wissy2 likes this.
  3. chrissy_wissy2

    chrissy_wissy2 Avid Boxer

    Joined:
    Oct 21, 2015
    Messages:
    161
    Likes Received:
    72
    Cheers for the response. I have tried this however my character gets bigger and bigger when colliding with certain objects so when it gets to the end scene it’s always a different size so when it scales down based on the timer within the scale animation node it ends up being a different scale and doesn’t look right.
     
  4. spicedbeangames

    spicedbeangames Miniboss Boxer

    Joined:
    Mar 31, 2016
    Messages:
    1,389
    Likes Received:
    596
    This has got to do with collision. So I *think* as your character scales up/down - the collision shape doesn't. Can you post a video? The only work around I can see right now would be to try a Health/Damage Node.

    So if your character collides with the object to make it bigger before it gets smaller, you could use a +1 health to the health node. Then on the bonus level, say your character has +5 scale, as it collides with the bonus level floor/wall - whatever your set up is, it deals 1 damage, so after 5 tiles, your character will scale back to 0 and use the Game observer to end the level if health reaches 0 or whatever number you choose. So you will have to start the character with +1 health and the first bonus it collides with, needs to deal -2 damage, to balance things
     
    chrissy_wissy2 likes this.
  5. Josh (Nology Games)

    Josh (Nology Games) Avid Boxer

    Joined:
    Nov 27, 2017
    Messages:
    200
    Likes Received:
    155
    Not a bad idea, you could even use a looped timer to deal damage over time.
     
    chrissy_wissy2 likes this.
  6. chrissy_wissy2

    chrissy_wissy2 Avid Boxer

    Joined:
    Oct 21, 2015
    Messages:
    161
    Likes Received:
    72
    hi guys, thanks your responses and sorry for the delay things have been hectic.

    @spicedbeangames cheers for your reply actually got this working from the suggestion you made using the health and damage nodes(video below). However theres only one snag i have it. basically my character is set up so that when it hits the coins at the end it gets smaller an when defeated it goes to the next level/complete UI.



    But if my character for instance hits say for example 10 of the crosses on the floor at the start of a level it will complete the level if that makes sense.
     
    spicedbeangames likes this.
  7. spicedbeangames

    spicedbeangames Miniboss Boxer

    Joined:
    Mar 31, 2016
    Messages:
    1,389
    Likes Received:
    596
    Yeah it makes sense. It's hard to explain without seeing your nodes.

    So my best guess right now is that you have a collision group for those black crosses set to 'enemy' and the coins are too. This might be triggering the damage too. Technically it shouldnt as there's no damage being dealt but them(unless you set that up).

    So try renaming the collision group for the black crosses and using a new health/damage system with a new name that triggers the game over UI
     
    chrissy_wissy2 likes this.
  8. chrissy_wissy2

    chrissy_wissy2 Avid Boxer

    Joined:
    Oct 21, 2015
    Messages:
    161
    Likes Received:
    72
    Thanks for your suggestions I’ve only been using BB3 for 4 weeks! Yes that’s exactly how I have it set up. I will set up the crosses in another way to divert to a a game over UI. Cheers
     
    spicedbeangames likes this.

Share This Page