How do for destroy last object selected for player?

Get help using Construct 2

Post » Wed May 27, 2015 2:59 pm

I ´ve diferent object than the player can move, rotate, scale but i want put one more function : destroy object.

How can i do for know the last object selected for player and if the player decide not use it and destroy it.

Now the only soluce is one button for family object (bar , circle, rectangle) but want one only button with this function"destroy last object selected for player/mouse"

thanks.
B
5
Posts: 33
Reputation: 299

Post » Wed May 27, 2015 4:22 pm

You should use sprite instance ids (or you could probably use UIDs) and when a player clicks on a sprite, place the id (or UID) into a global variable (named 'lastClicked' for this post) then just do a destroy action for the sprite where id=lastClicked.
https://www.ravenheart.ca/home
I don't check the forums much anymore, but I will receive an email for PMs.

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
B
23
S
6
G
1
Posts: 1,419
Reputation: 4,857

Post » Wed May 27, 2015 5:22 pm

destroy action for the sprite where id = can you put a full capture of a event sheet how you do that, please. thanks.
B
5
Posts: 33
Reputation: 299

Post » Wed May 27, 2015 5:39 pm

https://www.ravenheart.ca/home
I don't check the forums much anymore, but I will receive an email for PMs.

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
B
23
S
6
G
1
Posts: 1,419
Reputation: 4,857

Post » Wed May 27, 2015 5:50 pm

thanks you. It ´s what i need (it ´s logical when i see it (your event sheeet) but can do it myself yet ;) hope one day, yes i will:) )
B
5
Posts: 33
Reputation: 299


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 21 guests