MoveTo action or plugin?

Discussion and feedback on Construct 2

Post » Mon Nov 11, 2013 12:18 am

Hi,

Any idea if this is available or coming? Rex's plugin doesn't work and I can't seam to find anything about it in the search. I'm using pathfinding atm but it's not as precise as I need it to be. Thanks.megatronx2013-11-11 00:46:34
My professional Royalty Free Music at Scirra Assets Store
--------------------------------
Specs: i5 2500, 16gb of ram, gtx 770, win 7, Focusrite Scarlett 8i6, Mackie mr8mk2, Alesis 320, browsing the net on chrome.
B
91
S
30
G
22
Posts: 1,985
Reputation: 20,149

Post » Mon Nov 11, 2013 1:32 am

Why isn't Rex's plugin working for you? I use it in almost every project.
B
101
S
32
G
11
Posts: 1,546
Reputation: 21,727

Post » Mon Nov 11, 2013 1:41 am

You could do it yourself via events, give an object two variables 'to_x' and 'to_y' and an event: always move clamp(self.movespeed, 0, distance(self.x, self.y, self.to_x, self.to_y)) pixels at angle angle(self.x, self.y, self.to_x, self.to_y). This doesn't give the easing formulas that the plugin has though obviously, though those can be implemented in expressions if you can find them/figure them out.
Moderator
B
95
S
34
G
33
Posts: 3,007
Reputation: 27,876

Post » Mon Nov 11, 2013 2:26 am

@Arima This is what i've done. But it works bit funky. MoveTo would be so simple: -Move to, -on object arrived. or something along those lines.



DestinationPonts var looks for example like this 864`960__864`736__864`536__464`536

@ArcadEd I don't know, Im getting this error message.
megatronx2013-11-11 02:29:15
My professional Royalty Free Music at Scirra Assets Store
--------------------------------
Specs: i5 2500, 16gb of ram, gtx 770, win 7, Focusrite Scarlett 8i6, Mackie mr8mk2, Alesis 320, browsing the net on chrome.
B
91
S
30
G
22
Posts: 1,985
Reputation: 20,149

Post » Mon Nov 11, 2013 2:29 am

Try putting it in the behaviors.
Image ImageImage
B
170
S
50
G
179
Posts: 8,379
Reputation: 113,427

Post » Mon Nov 11, 2013 2:34 am

Here is a beautiful and elegant example of how to do all of these. Have a look at the capx about 1/2 way down the first page of this thread, courtesy of Yann.

Ease In and Ease Out Functions
A big fan of JavaScript.
B
76
S
20
G
74
Posts: 2,245
Reputation: 46,464

Post » Mon Nov 11, 2013 2:35 am

Right! >.> Thanks man.
My professional Royalty Free Music at Scirra Assets Store
--------------------------------
Specs: i5 2500, 16gb of ram, gtx 770, win 7, Focusrite Scarlett 8i6, Mackie mr8mk2, Alesis 320, browsing the net on chrome.
B
91
S
30
G
22
Posts: 1,985
Reputation: 20,149

Post » Mon Nov 11, 2013 2:38 am

Newt wins :). Hopefully have it working now. Such a great add-on.
B
101
S
32
G
11
Posts: 1,546
Reputation: 21,727

Post » Mon Nov 11, 2013 2:39 am

Thanks everyone!

@ArcadEd yeah it is loaded now ;) Edit: The plugin is in did incredible! :)

@Colludium Interesting examples! megatronx2013-11-11 02:53:52
My professional Royalty Free Music at Scirra Assets Store
--------------------------------
Specs: i5 2500, 16gb of ram, gtx 770, win 7, Focusrite Scarlett 8i6, Mackie mr8mk2, Alesis 320, browsing the net on chrome.
B
91
S
30
G
22
Posts: 1,985
Reputation: 20,149


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 17 guests