How do I Destroy object on drag and drop

0 favourites
  • 2 posts
From the Asset Store
This is a single chapter from the "Construct Starter Kit Collection". It is the Student Workbook for its Workshop.
  • 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

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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.

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