how drop and drag a object in a exact position?

0 favourites
  • 5 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 guys i have a question well really iam making a animal cell game and i want the kid drag a part of the cell and when he drop in wrong place the cell part comes to original position until he put the part in correct place

    PD: i hope understand me :(

  • Soon as the object is touched, record it's x and y position to a variable, then if it not in the right place, put it back to the positions in the variables.

    Is that what you mean?

  • yep that i mean D: but can do a example ?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • If you want an animation of the organelle going back to the origin when placed in an incorrect spot;


    1) make an copy of the organelle in the correct spot with outlining collision points, and then make it invisible.

    2) Make an event; that if the organelle overlaps it's invisible counterpart while the mouse button is released, then "yay... a kid wins a gold star" .... but... if else then goto bullet point three

    3) As ArcadEd suggested; record the X:Y coordinates. Also record the X:Y of where the organelle was dropped. Make a "for:next" loop stepping one: from 1 to 10 (sorry if I used the wrong terminology)

    4) Subtract the origin coordinates from the the coordinates of where it is dropped. Divide the difference by ten and multiply by the step of the for/next loop.

    5) Display the organelle each step

    It would be a little choppy, but that number 10 could be adjusted for that.

  • :O ok i got it thanks felinous and arcaded iam going try the steps :3

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