How do I set a set time for animation?

0 favourites
  • 5 posts
From the Asset Store
Ninja char for your game! Make your own Shinobi game with this art.
  • Hi all, here is my problem, system: every 3 secs : enemy set animation to "atk"

    system: every 15 secs : enemy set animation to "tired"

    and I set tired animation on loop. I want that tired animation last for 6 secs or more, and I want to keep at as every 3 secs, how do I do that, any help will be appreciated, thankyou very much.

  • Don't use "Every X seconds" for this. It will affect all enemies at once, which will look weird. Also, if you return to this layout, "Every 15 seconds" may start earlier than you expect.

    You need Timer behavior here. Add Timer to Enemy sprite. In On Enemy created event (or on start of the layout) start a timer "attack" for 3 seconds. In On Timer "attack" event change animation and start another timer - "tired". In "tired" timer start "attack" timer again.

    You can randomize the time a little to add variety to your enemies. For example, start a timer for random(3,4) seconds.

  • Thanks for replay, I set 3 secs timer for attack but it wont stop after 3 secs, even i put stop timer underneath it, it just keep doing the animation "atk".

  • The Timer behavior just keeps track of time, it won't do anything else. If you need to stop the attack animation, or perform any other actions, you have to do this in "Enemy On Timer" event.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • OK, Thanks.

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