How do I execute action when animation finished for Familly?

0 favourites
  • 9 posts
From the Asset Store
Carousel Animation, make carousel of you image gallery or anything
  • Hello,

    I wanted to execute action when Animation for a Familly is finished, but it didn't work, for now reason.

    Juste found an old discussion about that, but no anwser :

    Is it a known bug, or there is another solution?


  • It's unlikely to be a bug, can you share what you did ?

  • Sure!

    Sorry it's in french, but I'll translate.

    I start a For Each Collide object

    - If Collide Boolean isAttacking is on

    - If Familly.sprites.ID is = Collide ID

    - - If Animation is finished

    - => Set Colide Boolean to off.

    All the condition are true.

    if I remplace animation finished by "animation frame = 4" it's work, but I prefer to have something more flexible and not limited my animations to a same number.

  • you have on animation finished which is a trigger. I think that is the problem.

    I would put the on animation finished as the first event and then have the others as sub events below.

  • from the documentation:

    However, triggers are an exception. See the green arrow to the left of Keyboard: On Space pressed from the previous example:

    An event with a triggered condition

    This indicates the event is triggered. Rather than running once per tick, this event simply runs (or "fires") upon something actually happening. In this case, the event runs when the user hits the Spacebar key on the keyboard. It is never checked any other time. Since triggers run upon an event happening, they aren't checked in top-to-bottom order like other events. This means the ordering of triggers relative to other events is not important (except relative to other triggers of the same type, since triggers still fire top-to-bottom).

    There can only be one trigger in an event, because two triggers cannot fire simultaneously. However, multiple triggers can be placed in 'Or' blocks (see the next section).

  • Oh I see... that's working now.

    I didn't know that, thanks a lot!

  • Hum, in fact, it seems to partialy works.

    The condition execute only once and didn't works for the others Sprite.Familly object after :

    Maybe I doing something wrong again?

  • I'm not certain but it could be that picking the hitbox doesn't work correctly.

    I would do something like this:

    On animation "attacking" finished

    pick hitbox by comparison: =

    set hitbox attacking to false

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Same result that way.

    I found a solution, don't know if it's the good one, but it seems to works.

    I start by :

    - If Colide.ID => Attacker.ID

    - If Boolean attack => True

    -- If Animation is finished

    -- =>set Boolean to false

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)