How do I destroy a sprite on layout 1 when on layout 2

0 favourites
  • 3 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.
  • hello,

    How do I destroy a sprite on layout 1 when on layout 2.

    the scenario is layout 1 is a map which lets the player roam around, but there are blockades (sprites) around the map, layout 2 is a question layout which determines which blockades are destroyed depending on the answer.

    so when the player on collision with another sprite (npc) it opens the question layout 2 and if a answer is clicked on layout 2 a blockade on layout 1 is destroyed.

    at the moment am stuck on the last bit "if a answer is clicked a blockade on layout 1 is destroyed."

    P.S sorry if the explanation isn't great xD if it confuses you just ignore it and look at the subject

    Thank you

    regards Nisray

  • Set a flag or change some value to reflect that a choice has been made. Then upon returning to layout 1, act upon the changed value/flag .

    Layout 2

    If the answer is clicked

    Set DestoryBloackade to 1

    Layout 1

    If DestoryBloackade = 1

    Destory Blockade

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • still having problems, i have followed your instructions yet it still wont go away. is it because it is on two different layouts? should it be in one event sheet or is it fine in two?

    thanks work it out needed to set it as a global

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