Event for animation SOLVED

0 favourites
  • 9 posts
From the Asset Store
14 amazing sound files of game events like Level Ups, Level Completes, object spawn, object taking etc.
  • my animation have 5 frames, I want do something like that when bullet hits sprite, sprite display next or previous frame. Maybe in 'Animations' should be new action 'go to next frame' (?)

  • delgado you could do something like:

        + bullet sprite-> On collision with (the sprite you want)

            -(The sprite you want)-> Set frame (The Frame you want)

  • No problem, just make sure that that paticular animation has an 'animation speed' of 0 (so when you set to a frame in that animation the rest dont play).

    Then when the bullet hits the character use 'set frame' to whichever you like.

    If you had another variable like "DamageTaken", you could set the frame to 0 +Player.DamageTaken

    (0 +the number of damage taken).

  • Wink but every i hit the sprite automatically he should go to next/previous frame.

    I try set frame +1 (dont work) at the moment only way is to do when frame is 0 and bullet hit sprite go to frame 1, when frame is 1 and bullet hit sprite go to frame 2 etc etc

    Maybe Ashley going to do auto next / previous frame

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ya, I didn't try it but it seemed like it might work. Did you try GenkiGenga's idea that sounds better than mine.

  • i try soon but i must first translate words from english to polish ;p

  • Wink but every i hit the sprite automatically he should go to next/previous frame.

    I try set frame +1 (dont work) at the moment only way is to do when frame is 0 and bullet hit sprite go to frame 1, when frame is 1 and bullet hit sprite go to frame 2 etc etc

    Maybe Ashley going to do auto next / previous frame

    Sprite: Set animation frame to Sprite.AnimationFrame +1

    or

    Sprite: Set animation frame to Sprite.AnimationFrame -1

  • Thanks shinkan that works :)

  • Sprite: Set animation frame to Sprite.AnimationFrame +1

    or

    Sprite: Set animation frame to Sprite.AnimationFrame -1

    Thank you very much.

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