How do i fix multiple sprite animation thing?

0 favourites
  • 3 posts
From the Asset Store
Carousel Animation, make carousel of you image gallery or anything
  • I need help. i am making a platformer game and in the game there are enemys and the player has a gun but when the enemy gets shot, the player adds 1 to a variabel called: animation: and there is a every-tick event thats tells the enemy to change animation frame to the variabel, that all works but there are other enemys in the layout, and when one of them sets their animation to the dead frame all of the other enemys also sets their animation to the dead frame.

    i dont know what to do. sorry for bad english im swedish

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You need to make sure that you are picking the correct instance of the enemy. In your case you should tag enemies that have been hit (with a boolean or something), and only change the animations of those enemies.

    But I think you are overcomplicating this. Are you trying to show hit damage on the enemy by changing their animations? If so, you should keep a variable like hitPoints on each enemy. Deduct 1 from their HP when hit, and then set their animation based on their HP.

  • thank you, it worked. i just added an instance instead of a variabel.

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