Problem with Animations.

This forum is currently in read-only mode.
From the Asset Store
3 pixel charaters with over 8 animations each + animations with a gun
  • Hi, well I'll say the problem.

    I'm making this enemy, based on animations. I made it with different animations with conditions, so the conditions are true based on what animation is played. I had 2 problems:

    1) I made the events like that:

    If 'action' = 1 and

    When Animation 01 finished -> Set value 'action' to 2

    If 'action' = 2 and

    When Animation 02 finished -> Set value 'action' to 3

    If 'action' = 3 and

    When Animation 03 finished -> Set value 'action' to 1

    If 'action' = 1 -> Set animation '01'

    If 'action' = 1 -> Set animation '02'

    If 'action' = 1 -> Set animation '03'

    Animation 01 is 13 frames long, Animation 02 is 12, and Animation 03 was 16 frames long too, but the animation didn't played well, so I had to delete some frames and make it 11 frames long, if there was more frames, the animation didn't player well (it got stucked on some part of the animation).

    So, after fixed that, I had another problem:

    2) For bullets from enemy I did:

    If action = 1,

    Action frame = 6,

    'shoot' = 0 -> Create object Bullet, Set 'shoot' = 1

    If action = 1,

    Action frame = 12,

    'shoot' = 1 -> Create object Bullet, Set 'shoot' = 2

    If action = 3,

    Action frame = 6,

    'shoot' = 2 -> Create object Bullet, Set 'shoot' = 3

    If action = 3,

    Action frame = 11,

    'shoot' = 4 -> Create object Bullet, Set 'shoot' = 0

    That way would work like a loop, and I'm telling Construct to create object on each animation frame I want.

    The problem is the last condition, Construct doesn't read it, so the value 'action' is never set to 0 and the loop is broken. (And the last bullet doesn't come).

    Please help with that, I don't know if there is a limit in animation frame or something, thanks,

    Carlos.

  • I'm not sure but.... maybe animation frames start from 0?

    there's been some mixups with stuff starting from 0 in some places and from 1 in others.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • No, I'm sure is not that, animation always start on 1.

  • you could try On Animation Finished instead of comparing to the last frame

    :s

    still weird, last frame should work

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