Differences

This shows you the differences between two versions of the page.

Link to this comparison view

ja:gdevelop5:behaviors:draggable [2019/10/11 16:09] (current)
mightycraft created
Line 1: Line 1:
 +FIXME **This page is not fully translated, yet. Please help completing the translation.**\\ //(remove this paragraph once the translation is finished)//
  
 +# Draggable Object Behavior
 +
 +<note tip>​**See it in action!** 🎮\\
 +[[#​Examples|I would rather see the Draggable object behavior examples! Please take me there now.]]
 +</​note>​
 +
 +The draggable object behavior will make the object draggable with the mouse or by touching it on a touchscreen.
 +
 +## Add the Draggable behavior to an object
 +
 +To add the Draggable behavior to an object, start with creating an object or open the object'​s properties by accessing the object in the Scene Objects list. Select "Edit object"​ from the popup list. Then select "​Behaviors"​ and click the add behavior button. ​
 +
 +{{ :​gdevelop5:​behaviors:​addbehavior.jpg |}}
 +
 +Choose the behavior in the list:
 +
 +{{ :​gdevelop5:​behaviors:​draggable-object-behavior-inlist.png?​nolink |}}
 +
 +## Properties and events
 +
 +This behavior has no options to change. It automatically applies to the object(s) having it.
 +Using the events, you can still disable or reactivate this behavior for some objects - if you want to enable the player to move only some objects or restrict this to be done during a particular moment.
 +
 +Using events, you can also check if an object is being dragged:
 +
 +{{:​gdevelop5:​behaviors:​eventcondtiondraggableobject.png |}}
 +
 +
 +# Examples ​
 +
 +<note tip>​**See it in action!** 🎮\\
 +Open these examples online.</​note>​
 +
 +**Snap to Grid**
 +
 +{{ :​gdevelop5:​behaviors:​snaptogrid.png | }}
 +
 + ​https://​editor.gdevelop-app.com/?​project=example://​snap-object-to-grid
 +
 +**Shoot Bullet in Parabola Pattern** (A parabola is a plane curve which is mirror-symmetrical and is approximately U-shaped. Basically, an object that shoots toward an object in a curved trajectory.)
 +
 +{{ :​gdevelop5:​behaviors:​shootbulletparabolapattern.png | }}
 +
 +* https://​editor.gdevelop-app.com/?​project=example://​shoot-bullet-in-parabola
 +
 +**Save and Load**
 +
 +{{ :​gdevelop5:​behaviors:​saveandloadexample.png | }}
 +
 +* https://​editor.gdevelop-app.com/?​project=example://​save-load
 +
 +**Path Finding Basics**
 +
 +{{ :​gdevelop5:​behaviors:​pathfindingbasics.png | }}
 +
 +* https://​editor.gdevelop-app.com/?​project=example://​pathfinding-basics