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

Get help using Construct 2

Post » Thu Mar 27, 2014 10:03 am

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
B
2
Posts: 2
Reputation: 154

Post » Thu Mar 27, 2014 10:24 am

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
B
52
S
10
G
7
Posts: 184
Reputation: 6,850

Post » Thu Mar 27, 2014 10:52 am

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
B
2
Posts: 2
Reputation: 154


Return to How do I....?

Who is online

Users browsing this forum: tarek2, wenwen11212016, Yahoo [Bot] and 10 guests