How do I Destroy object on drag and drop

Get help using Construct 2

Post » Tue Jul 11, 2017 8:53 am

Hi,

I am attempting to destroy an object after it has been dragged and dropped, but it only seems to work after I click on the dropped object a second time and was wondering what I am doing wrong. I have placed a snippet of the code where I am trying to do this and would love some advice please.

(I thought this first code bit would work)
Touch - On tap gesture on (Tower_IMG_1)
Tower_IMG_1 - Drop [] DragDrop
Tower_IMG_1 - Set Active to 0
- Spawn second (larger image)
Tower_IMG_1 - Destroy

(I had to add this bit for it to work at all but requires a second click on the image)
Touch - On any touch end & Tower_IMG_1 Active=0
Tower_IMG_1 - Destroy
Tower_IMG_1 - Set Active to -1

Thank you
B
6
S
2
Posts: 38
Reputation: 567

Post » Tue Jul 11, 2017 8:56 am

It should just be On Drop > Destroy. The behaviour handles all of the dragging and dropping without the need for touch events. The touch commands you're using are for general touch and can be represented by mouse clicks, which is why you need to click on the object.
B
46
S
16
G
79
Posts: 2,170
Reputation: 46,857


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 34 guests