[Solve] How to tell duplicate sprite to destroy.

0 favourites
  • 4 posts
From the Asset Store
A set of 10 pixel art animated magic effects with icons. 2 Fire, 2 Earth, 2 Wind, 2 Water, Portal, Explosion.
  • If I put heart icon represent player's life.

    I drag one heart icon in the scene.

    Hold Ctrl key and drag to make another 2 copies of it.

    So it'll be 3 hearts in the scene.

    I want to order destroy the heart 1,2,3.

    How to do that, cause all the hearts have the same name.

    When I put destroy heart, all of them will be gone.

  • Set an instance variable (name "order" for example).

    Make a condition, testing if the Heart object's instance variable is either 1, 2 or 3.

    The destroy action will pick only the heart with the correct value.

    Be sure to set a different value to each heart.

  • How to make subevent inside of event?

    Right now it is like this.

    MONSTER : On collision with Player | Player : subtract1 from P_Health

                                       | Monster : destroy

                                       | (how can I add condition here?)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I got it, thank you so much, Kyatric.

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