Description

This asset package allows you to turn your object(s) into an object with drag-and-drop capabilities, with a minimal amount of work for you.

Features:

  • Comes with a working demo (import all assets)

  • Drag and drop an object with 1 call

  • Drop an object so it snaps to another object's location (with optional range check)

Must read the included READ_ME.txt file before using scripts

There are two primary scripts that allow you to quickly add drag-and-drop functionality with a single call:

scr_dragNdrop(objToMove, dragDepth, mouseDragIcon);
scr_dragNdrop_ext(objToMove, dragDepth, mouseDragIcon, snap_obj, snap_x, snap_y, maxDistX, maxDistY);

However, there are also seven scripts to help you customize drag-and-drop functionality for your project:

scr_dNd_drag(objToDrag, dragDepth, mouseDragIcon);
scr_dNd_drop(objToDrop);
scr_dNd_getDist(value_1, value_2);
scr_dNd_getManager();
scr_dNd_snap(objToMove, snap_obj, snap_x, snap_y, maxDistX, maxDistY);
scr_dNd_snapBack(objToDrop);
scr_dNd_snapTo(objToDrop, pos_x, pos_y);

Each script contains comments explaining what the script does, and how it works.

Documentation is also included as a plain text file named "dragNdrop_doc.txt."

Please read all included text files, starting with "READ_ME.txt," they will explain how to setup and use the dragNdrop scripts properly.

You may:

  • Use these scripts in YOUR project for commercial purposes; just make sure the scripts themselves are NOT made available to your customers.

You may NOT:

  • Resell these scripts.
  • Share/distribute these scripts in a way that they can be used by other people.

If you have any questions, do not hesitate to ask them, I will be more than happy to answer.

You can reach me through the dragNdrop scripts forum (click the "Support" link above); or you can email me at:

RossSolutions_Games@yahoo.com (click the "Contact Publisher" link above).

End User Licence Agreement (EULA).

Age Rating: 4+

Version

GMS1 - Version 1.0.4. Published September 3, 2016

2 new variables must now be added to your drag-and-drop enabled objects: - isSingleDrop - isLocked

Updated the scripts: - scr_dNd_drop [lines 46-51] - scr_dNd_snapTo [lines 59-64]

It is now possible to set an object(s) to lock in place after it has been moved once via the dragNdrop scripts. For objects using the advanced drag and drop script "scr_dragNdrop_ext()" and snaps to a specific object, the object being dragged will only be locked after successfully snapping to the snap object.

Please refer to the included text file "Using_dragNdrop.txt" for details on updating your objects with the necessary code to use this new feature.

Loading, please wait

Package contents

Loading, please wait

What is the issue?

Loading, please wait

Back to Top