How to destroy a specified object

For questions about using Classic.

Post » Mon Feb 01, 2010 10:40 pm

I have a sprite (Sprite1) with 2 private variables. At the start of the Layout I call a function witch creates 4 sprites from Sprite1 and assign to every variable some data.

Now when I press a button I want to read some data from the private variables from a specified Sprite and then to destroy it. If I call Destroy function all the 4 sprites will be destroyed.

How can I make to destroy or to manipulate only a specified sprite/object?
B
2
G
2
Posts: 20
Reputation: 690

Post » Mon Feb 01, 2010 10:56 pm

Use the sprite's "Compare a private variable" condition to pick a specific sprite.

Read more on picking instances and the Selected Object List here:

wiki link
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Tue Feb 02, 2010 10:41 am

Thanks for the wiki link. Now it's done.
B
2
G
2
Posts: 20
Reputation: 690


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 2 guests