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
89
S
29
G
22
Posts: 1,984
Reputation: 19,997

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,552
Reputation: 21,667

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
94
S
33
G
33
Posts: 3,006
Reputation: 27,749

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
89
S
29
G
22
Posts: 1,984
Reputation: 19,997

Post » Mon Nov 11, 2013 2:29 am

Try putting it in the behaviors.
Image ImageImage
B
168
S
50
G
169
Posts: 8,282
Reputation: 108,193

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
74
S
20
G
69
Posts: 2,205
Reputation: 43,832

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
89
S
29
G
22
Posts: 1,984
Reputation: 19,997

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,552
Reputation: 21,667

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
89
S
29
G
22
Posts: 1,984
Reputation: 19,997


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 9 guests