Character Defeat

Discussion in 'Buildbox 3.0' started by Tiger CraftSquad, Apr 23, 2020.

  1. Tiger CraftSquad

    Tiger CraftSquad Boxer

    Joined:
    Apr 23, 2020
    Messages:
    2
    Likes Received:
    0
    Hi,

    When animated character is defeated, I would like to play "defeat animation" only. What happens instead is, that last frame (or loop of frames if I keep holding movement key upon defeat) remains there, which causes a "duplicated" character as seen in attachment.

    How to prevent this?

    Thanks :)
     

    Attached Files:

  2. Escanor

    Escanor Boxer

    Joined:
    May 30, 2020
    Messages:
    7
    Likes Received:
    0
    Same issue !
     
  3. spicedbeangames

    spicedbeangames Miniboss Boxer

    Joined:
    Mar 31, 2016
    Messages:
    1,389
    Likes Received:
    596
    check the number of frames in the animation. You might have too many. Also check that it is not stuck on loop, unless you want it to
     
  4. Escanor

    Escanor Boxer

    Joined:
    May 30, 2020
    Messages:
    7
    Likes Received:
    0
    Only 10 frames. It is on loop, but it's on purpose. I've tried many things, none of them is working... It's weird because I don't see many people having the same issue
     
  5. Codifie

    Codifie Avid Boxer

    Joined:
    Apr 17, 2018
    Messages:
    364
    Likes Received:
    190
    You are Removing the character after the animation ends right? Or does your defeated character stay on the screen as defeated?
     
  6. Escanor

    Escanor Boxer

    Joined:
    May 30, 2020
    Messages:
    7
    Likes Received:
    0
    Here is what it does:

    upload_2020-6-5_10-52-6.png upload_2020-6-5_10-52-19.png
     
  7. mohamed awad

    mohamed awad Avid Boxer

    Joined:
    Mar 10, 2019
    Messages:
    315
    Likes Received:
    158
    that means defeated node receives many signals, so try this
    disable defeated output when just one come out
    disable movement if it is unnecessary

    this is how to disable output
    replace defeated node script with this below

    let enabled = true;
    function signal(name, value) {
    if (value && enabled) {
    enabled = false;
    this.emitSignal('Defeat', true);
    }
    }
     
  8. Escanor

    Escanor Boxer

    Joined:
    May 30, 2020
    Messages:
    7
    Likes Received:
    0
    Thank you for your answer and your willingness, but it still doesn't work... How do you disable movements ?
     
  9. mohamed awad

    mohamed awad Avid Boxer

    Joined:
    Mar 10, 2019
    Messages:
    315
    Likes Received:
    158
    you should disable movement animations to get it worked
    by editing on platformer node
    can you share bbdoc file and I will do it ?
     
  10. mohamed awad

    mohamed awad Avid Boxer

    Joined:
    Mar 10, 2019
    Messages:
    315
    Likes Received:
    158
  11. Escanor

    Escanor Boxer

    Joined:
    May 30, 2020
    Messages:
    7
    Likes Received:
    0
    Thank you SO much. It's working. I'm happy !
     

Share This Page