Invincibility Zone

Discussion in 'How Can I...?' started by Selasu, Nov 12, 2016.

  1. Selasu

    Selasu Boxer

    Joined:
    Jun 27, 2016
    Messages:
    50
    Likes Received:
    9
    Hey everyone, I'm wondering if anyone has found a way to make the character invincible only when he is touching the invincibility action. I know i can make the invincibility last for however long I want, but is there a way to make the character invincible only in a certain zone? Then once he leaves this invincibility zone he can be killed by enemies again?
     
  2. alexsafayan

    alexsafayan Boxer

    Joined:
    Oct 14, 2016
    Messages:
    71
    Likes Received:
    12
    Currently not possible in Buildbox ;(
     
  3. Christoph

    Christoph Miniboss Boxer

    Joined:
    Oct 4, 2015
    Messages:
    2,807
    Likes Received:
    2,309
    Depends on your game, but this will probably work:

    1. Make an invincibility action with a duration of 99999 in your zone. So when the user picks it up he will be invincible.
    2. Make another invincibility action with a duration of 0.01. This action needs to be placed around the border of your zone so when the player leaves the zone he picks up this new action which will make the invincibility end very fast.

    I did not check it but I think this works...
     
    Selasu, heathclose and playsgames6666 like this.
  4. Selasu

    Selasu Boxer

    Joined:
    Jun 27, 2016
    Messages:
    50
    Likes Received:
    9
    Great thinking, thank you @Christoph!

    If anyone else is interested, the little workaround solution i came up with was make an invisible "character bullet", add a spawner component and set it to 0.01 permanent, that way you'll have a constant stream of bullets which will destroy enemies around a certain invincibility zone.
     
    Christoph likes this.
  5. Christoph

    Christoph Miniboss Boxer

    Joined:
    Oct 4, 2015
    Messages:
    2,807
    Likes Received:
    2,309
    Great thinking as well. Thanks for sharing. Buildbox is all about improvising and using implemented features in new ways.
     
    Selasu likes this.
  6. Selasu

    Selasu Boxer

    Joined:
    Jun 27, 2016
    Messages:
    50
    Likes Received:
    9
    Hey @Christoph unfortunately the first infinite invincibility action doesn't go away after touching the second instant invincibility action, the first one just stays for all the duration :( Nice try though
     
  7. Selasu

    Selasu Boxer

    Joined:
    Jun 27, 2016
    Messages:
    50
    Likes Received:
    9
    NEVERMIND!!!! MY BAD!! I had just messed up the action on the second invincibility, it works great!!! :D
     
    Christoph and playsgames6666 like this.
  8. Christoph

    Christoph Miniboss Boxer

    Joined:
    Oct 4, 2015
    Messages:
    2,807
    Likes Received:
    2,309
    Haha... Cool!
     

Share This Page