Drecrease life

0 favourites
  • 4 posts
  • I intend to decrease life, removing little sprites that represent players life. How to implemt it?

    Thanks

  • you can make the amount of max lives, and set all the lives whivh are not in the starting to invisible, add a variable for lives, then add as many events as you need,

    if [health] = 2     set heart1 visible

                        set heart2 visible

    if [health] = 4     set heart1 visible

                        set heart2 visible

                        set heart3 visible

                        set heart4 visible

    if player is on collision with enemy     subtract 1 from [health]

    it's a bit messy but i can't thank of another way

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Could I use a sprite with 5 frames (one frame with 5 images, other with 4, etc)and change the animation as played lost lives, for example? or it�s not a good solution?

  • it could be a solution but you need to change frame, not the animation.

    It would be :

    On collision with

                   set frame to [FrameNumber]

    Though it think that solution provide by Ash1221 is more flexible if you need to tweak your life. Using variable is important.

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