Drag & Drop axes property as an action

For developers using the Construct 2 Javascript SDK

Post » Thu Oct 29, 2015 10:52 pm

Hi guys,

Is there a chance that the official Drag & Drop behavior can be modified, so that the axes property is available as an action?
B
13
S
5
G
1
Posts: 116
Reputation: 1,805

Post » Thu Oct 29, 2015 10:53 pm

what kind of action do you want to request?
Image Image
B
22
S
13
G
135
Posts: 871
Reputation: 70,320

Post » Thu Oct 29, 2015 11:14 pm

@MadSpy

An action to switch to one of the 3 states (Both, Horizontal only, Vertical only)

ex: If the state in the editor is set to "Both", have the availability as an event action to switch to "Horizontal only"
B
13
S
5
G
1
Posts: 116
Reputation: 1,805

Post » Thu Oct 29, 2015 11:24 pm

You can do that with events
but I admit it will be more easier with this action
Image Image
B
22
S
13
G
135
Posts: 871
Reputation: 70,320

Post » Thu Oct 29, 2015 11:30 pm

@MadSpy

I don't see an option in the events to change that! The only available actions are to set the behavior enabled/disabled and to force drop.
Maybe I'm missing something?
B
13
S
5
G
1
Posts: 116
Reputation: 1,805

Post » Thu Oct 29, 2015 11:37 pm

(Sorry, my english is not really good :/)
I mean you can restrict the movement with your own events
It can be done quickly
Image Image
B
22
S
13
G
135
Posts: 871
Reputation: 70,320

Post » Thu Oct 29, 2015 11:45 pm

@MadSpy

Sorry to bother you again and again but I would appreciate if you can give me an example.

What I'm trying to do is have a sprite with 3 animation frames and depending on which frame is playing, constraint the movement to different axes.

(My English is not good too, so that makes 2 of us!)
B
13
S
5
G
1
Posts: 116
Reputation: 1,805

Post » Thu Oct 29, 2015 11:46 pm

ok wait a minute
Image Image
B
22
S
13
G
135
Posts: 871
Reputation: 70,320

Post » Thu Oct 29, 2015 11:54 pm

The capx
non optimized but you have the idea...
left click to drag right clik to change drag mode
Image Image
B
22
S
13
G
135
Posts: 871
Reputation: 70,320

Post » Fri Oct 30, 2015 12:18 am

Thanks a lot for your time and effort man!
Yes, it partially works so I guess I'll have to do some fine tuning.
I believe that a modification in the behavior will make the constraints more consistent though.

Thanks again for the valuable help!
B
13
S
5
G
1
Posts: 116
Reputation: 1,805

Next

Return to Javascript SDK

Who is online

Users browsing this forum: No registered users and 0 guests