Invincibility action doesn't work

Discussion in 'Buildbox General Discussion' started by trygii, Nov 30, 2015.

  1. trygii

    trygii Avid Boxer

    Joined:
    Oct 14, 2015
    Messages:
    307
    Likes Received:
    72
    I have trouble setting up this action. Once my character get the invincibility action, and touches the enemy, the character dies. I made sure that the duration is long enough. What would be the issue?
     
  2. trygii

    trygii Avid Boxer

    Joined:
    Oct 14, 2015
    Messages:
    307
    Likes Received:
    72
    Played around with the settings and I still couldn't figure it out. Do anyone have any solutions?
     
  3. Phill Mason

    Phill Mason Serious Boxer

    Joined:
    Sep 25, 2015
    Messages:
    880
    Likes Received:
    721
    I've not used invincibility, but I would imagine it's probably the 'collision shape' of your image you're using whilst invincible. Also make sure to check where the animation placement is if you're using an animation whilst invincible. It can also help to have 'debug mode' switched on whilst in preview so you can see all the collision states of everything on screen, that should help identify why your characters getting killed.
     
  4. trygii

    trygii Avid Boxer

    Joined:
    Oct 14, 2015
    Messages:
    307
    Likes Received:
    72
    @Phill Mason I checked the collision shape while on debug mode, and the collision shape of the shield ignores the enemy. Once the character touches the enemy and not the shield, it dies. The Animation Placement is set on Character.

    I have absolutely no idea whats wrong. :confused:
     
  5. Christoph

    Christoph Miniboss Boxer

    Joined:
    Oct 4, 2015
    Messages:
    2,807
    Likes Received:
    2,309
    It may worth it to play with the health settings of the enemies. I can imagine if you have something higher than 1 (or including 1) the shield is not enough to kill the enemies.
     
  6. trygii

    trygii Avid Boxer

    Joined:
    Oct 14, 2015
    Messages:
    307
    Likes Received:
    72
    @Christoph Yes that fixed it! I changed the health of the enemy from 1 to 0. Thank you! :)
     
    Christoph likes this.
  7. trygii

    trygii Avid Boxer

    Joined:
    Oct 14, 2015
    Messages:
    307
    Likes Received:
    72
    @Christoph I've got another problem now :p If my character touches the enemy without any shield, just the character, then both the character and enemy will die. This is because the health of the enemy is 0. This is really frustrating haha :p Doesn't anyone else have this action in one of their games that could help me out?
     
  8. trygii

    trygii Avid Boxer

    Joined:
    Oct 14, 2015
    Messages:
    307
    Likes Received:
    72
    I think I found the problem. The Default Animation has a collision shape. But the Action Animation has no collision shape so that's perhaps why the character dies when it touches the enemy. I can't put the Action Animation as an object because the Shield around my character will not follow and stick to my character (correct me if I'm wrong).

    Really getting a headache of this o_O
     
  9. Christoph

    Christoph Miniboss Boxer

    Joined:
    Oct 4, 2015
    Messages:
    2,807
    Likes Received:
    2,309
    Then try to put 1 in the health and 1 in the damage. This should kill the enemy with 1 bullet or in your case with 1 touch when using the invincibility action.

    Or try with 1 in the health and 2 in damage.

    Or with 1 in the health and 0 in damage.

    As you see I'm not sure with these setting either but it should work. Makibot for example uses this feature.
     
  10. trudnai

    trudnai Miniboss Boxer

    Joined:
    Sep 25, 2015
    Messages:
    1,235
    Likes Received:
    701
    No, you drop a sprite or a series of sprites if that is a real animation onto the Action Animation. The collision shape is independent of that sprite/animation.

    But what shield are you talking about? Did you create a "shield object" that you are trying to "glue" to your character?

    Invincibility is a state. Normally you do not need a separate shield or magic force. When you hit the Action, if the action is Invincibility then during the duration your character will be invincible and your character will kill the enemy, no matter how healthy the enemy or how many bullets it gets, and how much damage that enemy or bullet makes...
     
  11. trygii

    trygii Avid Boxer

    Joined:
    Oct 14, 2015
    Messages:
    307
    Likes Received:
    72
    @trudnai The shield I'm talking about is just an image of a shield that will be shown once the character hits the action. Should've said this earlier, sorry!

    It doesn't work, the health and the damage of the enemy is 1. Once the character hits the Invincibility Action, and then hits the enemy, the character will just die. I seriously have no idea how or why it does this
     
  12. trudnai

    trudnai Miniboss Boxer

    Joined:
    Sep 25, 2015
    Messages:
    1,235
    Likes Received:
    701
    Just thinking out loud: Could it be that you have 2 Invincibility actions on top of each others and they interfere each others? For example if you hit the first where invincibility lasts for 3 seconds, but then you hit the next invincibility which then cancels the first immediately, and depending on that one something happens. Maybe on that the timing is off so by the time you arrive to the enemy the invincibility is over...
     
  13. trygii

    trygii Avid Boxer

    Joined:
    Oct 14, 2015
    Messages:
    307
    Likes Received:
    72
    @trudnai Nope there is just 1 action that lasts for 60 seconds so that I can have enough time to test it on the enemy
     

Share This Page