Bounded Drag & Drop
The Bounded Drag & Drop behavior is an advanced and improved version of the official Drag and Drop behavior, for games built in Construct 3 and Construct 2. The plugin drags and drops object instances either by mouse or touch with advanced bounding features.
Features include bounding to either radius, position or both, bound by origin or edge, and bound methods of clamp and halt.
The Bounded Drag & Drop behavior implements advanced bounding features for all world objects.
Introduction
The Construct Master Collection has plugins that extends the editor and engine features of both Construct 3 and Construct 2.
Please click here to learn more about Game.
Features
The Bounded Drag & Drop behavior is an advanced and improved version of the official Drag and Drop behavior, for games built in Construct 3 and Construct 2. The plugin drags and drops object instances either by mouse or touch with advanced bounding features.
Features include bounding to either radius, position or both, bound by origin or edge, and bound methods of clamp and halt.
The Bounded Drag & Drop behavior implements advanced bounding features for all world objects.
Here are some of the game features of the game plugin:
Drag and Drop
Official Construct 3 drag and drop features included.
Bounded Drag and Drop
Advanced Drag and Drop
Easy drag and drop, with bounding features.
Mouse
Touch
Horizontal Axis
Vertical Axis
Bounding To features
Radius
Position
Radius and Position
None
Bound By
Origin
Edge
Bound Method
Clamp
Halt
Bound Origin
Bound X-radius
Bound Y-radius
Bound Position
Bound Min X
Bound Max X
Bound Min Y
Bound Max Y
Advanced control actions
Advanced checking conditions
Advanced value expressions
Dynamic bounding features, the behavior has the ability to adapt instantly with dynamic bound scope changes.
Well maintained and fully tested for production release.
For more information about game project features, please click here to read the introductory lessons to Game.
Platform Integration
Here are some of the platforms that are natively supported:
All platforms supported by Construct 3.
All platforms supported by Construct 2.
Web
Mobile Web
Desktop
Android
iOS
Build Support
Here are some of the supported build options:
Web
Desktop
NW.js
Windows (WebView2)
macOS (WKWebView)
Mobile
Android Studio
Xcode
Phonegap
Construct 3 Build Service
Facebook Instant Games
Playable Ad
Construct Arcade
Editor Features
Here are some of the features in the Construct editor:
Construct 3
Construct 2
How to use?
It is easy to use the Bounded Drag & Drop behavior, you will only need to follow the steps below.
1. The first step is to add any world object in your Construct 3 or Construct 2 project. Then place a world object instance in a layout.
Object in Construct 3 or Construct 2 is an entity you can see in your project bar, specifically in the Object types folder.
World object is an object type class that you can place in a layout and interact.
Sample world objects are the following:
Object instance is an element based upon the prototype object. Think of instances as duplicates that can have their own variant properties.
2. The second step is to click the Edit Behaviors button in the newly added object's properties. This will launch the Object behaviors dialog of the currently selected world object instance.
3. The third step is to click the Add new behavior button in the newly launched Object behaviors dialog.
4. Finally, add the Bounded Drag & Drop behavior, to include its features in the currently selected object and its object instances.
5. After adding the behavior, you will see the new object properties added by the behavior. You may refer to the Properties section far below to learn more about these properties.
6. There are default properties similar with the built-in Drag & Drop behavior, the Axes property is the direction you can drag the object, and the Initial state property determines if the behavior is initially activated.
7. Beyond the default properties, there are the advanced bounding feature properties. I recommend reading the Properties section far below to have insight on what feature each property has. You can also lookup the demo projects in the project kit in the bottom-most section of the page named Game Projects, to learn more in how to further use the behavior, especially with the event sheet.
Documentation
The Bounded Drag & Drop behavior is also available for free in the Construct 3 and Construct 2 addons directory. There are also documentations and support there, although we highly recommend supporting us so that we can provide more features.
You can visit the provided links below, so you can read more about the behavior.
Actions, Conditions & Expressions
Actions
The following action groups:
Default
Bound
Radius
Position
Default
Set enabled - Enable or disable the drag and drop behavior.
State - Choose whether to enable or disable the behavior.
Drop - If currently being dragged, force the object to be dropped.
Bound
Set BoundTo - Which to is the object bounded.
BoundTo - To which point the object is bounded.
Set BoundBy - Set the point object is bounded.
BoundBy - From which point the object is bounded.
Set Bound Method - Choose whether the object is halted or clamped when bounded.
Bound Method - 'Halt' bounding method is rough while `Clamp` is smooth.
Overwrite Origin Position - Overwrite the origin point (X,Y) of creation. Be careful when using this.
OriginX - Overwrite the origin point X of creation. Default : Instance creation X.
OriginY - Overwrite the origin point X of creation. Default : Instance creation Y.
Radius
Set Bound XYRadius - The radius in the X & Y axis it can move from its bound point. Both 0 is 'off'.
XRadius - The radius in the X-axis it can move from its bound point. 0 is 'off'.
YRadius - The radius in Y which it can move from its bound point. 0 is 'off'.
Set Bound XRadius - The radius in the X-axis it can move from its bound point.
XRadius - The radius in which it can move from its bound point. 0 is 'off'.
Set Bound YRadius - The radius in the Y-axis it can move from its bound point.
YRadius - The radius in which it can move from its bound point. 0 is 'off'.
Position
Set Bound Position - The X location it can only move from its bound point.
Minimum BoundX - The Minimum X-position it can only move from its bound point.
Maximum BoundX - The Maximum X-position it can only move from its bound point.
Minimum BoundY - The Minimum Y-position it can only move from its bound point.
Maximum BoundY - The Maximum Y-position it can only move from its bound point.
Set Bound X Position - The X location it can only move from its bound point.
Minimum BoundX - The Minimum X-position it can only move from its bound point.
Maximum BoundX - The Maximum X-position it can only move from its bound point.
Set Bound Y Position - The Y location it can only move from its bound point.
Minimum BoundY - The Minimum Y-position it can only move from its bound point.
Maximum BoundY - The Maximum Y-position it can only move from its bound point.
Conditions
The following condition groups:
Default
Bound
Radius
Position
Default
Is dragging - True if the object is currently being dragged.
On drag start - Triggered when the object begins to be dragged.
On drop - Triggered when the object is dropped (the drag stops).
Is enabled - True if the behavior is enabled.
Bound
On any bound exceeded - Triggered when the drag is beyond any kind of bounding.
Radius
On radius exceeded - Triggered when the drag is beyond any radius bounding.
Is radius exceeded - Triggered when the drag is beyond X radius bounding.
Position
On position exceeded - Triggered when the drag is beyond any position bounding.
Is position exceeded - Triggered when the drag is beyond X position bounding.
Expressions
The following expression groups:
Bound
Bound Radius
Bound Position
Bound Origin
Bound
BoundTo - Return to which point the object is bounded.
BoundBy - Return from which point the object is bounded.
BoundMethod - Return whether the object bound method is 'halt' or 'clamped'.
Bound Radius
xBoundRadius - Return the X Bound radius length.
yBoundRadius - Return the Y Bound radius length.
Bound Position
xMinBoundPos - Return the Minimum X Bound Position.
xMaxBoundPos - Return the Maximum X Bound Position.
yMinBoundPos - Return the Minimum Y Bound Position.
yMaxBoundPos - Return the Maximum Y Bound Position.
Bound Origin
xOrigin - Return the Origin X of creation.
yOrigin - Return the Origin Y of creation.
Showcase
There is currently nothing to show, we will add more in the future.
Game Projects
Instructions Kit
Specifications
-
Instructions - The game project contains instructions and steps on how to use the addon and its features.
-
Action, Conditions and Expressions - It covers the implementation of each action, condition and expression.
-
Tips and Tricks - It provides some tips and tricks on the recommended ways of using the addon.