TOUR
PRICING
HELP
Stencylpedia
Blocks Guide
Sample Games
Developer Center
FORUMS
CHAT
#MADEINSTENCYL
EDUCATION
SIGN IN
×
Welcome back!
Username or E-mail
Password
(
Forgot?
)
C
OMMUNITY
Home
Issue Tracker
Inbox [0]
New Posts
New Replies
Search
Stencyl Community
→
Stencyl
→
Ask a Question
→
Resolved Questions
→
Drag and drop behaviors problem
Pages:
1
2
3
Drag and drop behaviors problem
LIBERADO
Posts: 2720
December 20, 2014, 12:18:18 am
@flameblue59
, is your problem already solved?
I'm spanish, excuse me for my bad English.
I'm not a private teacher. Please, post your questions in the public forum.
flameblue59
Posts: 113
December 20, 2014, 06:11:33 am
I can't solve it. I dunno where to start. I just use drag and drop behavior as the default on stencyl. I think it needs some improvement to work as well.
LIBERADO
Posts: 2720
December 20, 2014, 06:18:39 am
Don't worry, be happy:
http://www.filz.us/files/85f2ba08/37f/Drag_and_Drop_only_one.swf
I'm spanish, excuse me for my bad English.
I'm not a private teacher. Please, post your questions in the public forum.
flameblue59
Posts: 113
December 20, 2014, 06:28:08 am
Hi, this is I'm looking for, may I know the events for the squre?. I'm so happy that you can do it
LIBERADO
Posts: 2720
December 20, 2014, 07:12:23 am
Yeah... I have attached in this post the basic project file of this behavior, so you can download it and use it for your convenience. It works also with different actor types and different layers. In this example I have created 4 layers and have placed two actors in each layer.
Important requirements
:
All selectable actors must be within the Group called SELECTABLE
If you place the actors in different layers, then you must maintain in the scene editor the natural order of the layers IDs creation: 0,1,2,3... (if you alter this order, the behavior won't work properly)
Do NOT place this behavior in the actors. It must be placed only in the scene.
That's all.
« Last Edit: December 20, 2014, 08:11:56 am by LIBERADO »
I'm spanish, excuse me for my bad English.
I'm not a private teacher. Please, post your questions in the public forum.
flameblue59
Posts: 113
December 22, 2014, 02:13:22 am
Thanks, it's worked perfectly.
Neotron
Posts: 475
December 22, 2014, 11:42:41 am
WOW, thank you LIBERADO! You are a real expert!
Can you tell me one more thing?
If I want to stop dragging one of these actors if it is FULLY inside in a Region 0 how can I do that?
I tried to use "IF actor 1 is inside Region 0" then "Anchor Actor 1" but somehow I still can drag the actor from the Region 0...
« Last Edit: December 22, 2014, 12:46:10 pm by Neotron »
LIBERADO
Posts: 2720
December 22, 2014, 07:35:14 pm
@Neotron
, your region is a circular region, or a square region?
I'm spanish, excuse me for my bad English.
I'm not a private teacher. Please, post your questions in the public forum.
Neotron
Posts: 475
December 22, 2014, 10:47:19 pm
Mostly square, but sometimes poligonal. Square would be great if could work.
LIBERADO
Posts: 2720
December 23, 2014, 05:40:46 am
Quote from: Neotron on December 22, 2014, 10:47:19 pm
Mostly square, but sometimes poligonal. Square would be great if could work.
For a square region, simply insert these blocks in my previously provided code:
« Last Edit: December 23, 2014, 05:54:27 am by LIBERADO »
I'm spanish, excuse me for my bad English.
I'm not a private teacher. Please, post your questions in the public forum.
Neotron
Posts: 475
December 23, 2014, 06:41:22 am
Thank you for the fast reply!
Now actor released well after it is inside the Region, that is cool! However, I can still pull it out from there...isn't there any solution where the actor cannot dragable/movable anymore if it is inside the region?
LIBERADO
Posts: 2720
December 23, 2014, 06:45:27 am
When I test my code, I can't drag or move the actor anymore if it is inside the region.
Make sure you have inserted the blocks in the correct place.
I'm spanish, excuse me for my bad English.
I'm not a private teacher. Please, post your questions in the public forum.
Neotron
Posts: 475
December 23, 2014, 07:57:24 am
Liberado, you are right, you save my day again!
Thank you and Merry Christmas!
Jaageri
Posts: 9
September 22, 2015, 09:40:45 pm
How can I open that attachment in stencyl * Drag and Drop only one Actor.stencyl (337.06 kB - downloaded 21 times.)
letmethink
Posts: 2545
September 22, 2015, 11:31:43 pm
Download it then click import game from within Stencyl. Select that game.
~Letmethink
Pages:
1
2
3