Follow path behavior

Discussion and feedback on Construct 2

Post » Mon Feb 13, 2012 5:55 pm

Oh my god... this is serious o_O

Great work man.
B
203
S
37
G
13
Posts: 136
Reputation: 29,523

Post » Sun Mar 11, 2012 5:31 pm

Insane code! I'm using this as well. Good job R0J0hound!
B
6
S
1
Posts: 29
Reputation: 1,058

Post » Fri Jun 08, 2012 7:59 am

That's great. Any plan to release this as a behavior plugin?
B
5
S
1
Posts: 34
Reputation: 1,026

Post » Fri Jun 08, 2012 1:57 pm

This. This is awesome.
B
6
Posts: 5
Reputation: 644

Post » Thu Oct 11, 2012 6:03 pm

So, what if I'd need to remove one of the objects from the string, or add one, somewhere in the middle? Can this be accomplished?
B
16
S
4
G
3
Posts: 46
Reputation: 2,875

Post » Thu Oct 11, 2012 6:42 pm

Really appreciate this! Thanks!
B
16
S
6
G
5
Posts: 90
Reputation: 4,324

Post » Thu Oct 11, 2012 7:34 pm

@xyboox
Yes, that is possible, but instead of using the IID to access the points store all the points in an array.

Then do these changes to the expressions:
p(n).x -> Array.At(n % Array.Width, 0)
p(n).y -> Array.At(n % Array.Width, 1)
p(n+1).x -> Array.At((n+1) % Array.Width, 0)
p(n+1).y -> Array.At((n+1) % Array.Width, 1)
p(n-1).x -> Array.At((n-1) % Array.Width, 0)
p(n-1).y -> Array.At((n-1) % Array.Width, 1)
B
79
S
24
G
52
Posts: 4,725
Reputation: 39,713

Post » Thu Oct 11, 2012 7:58 pm

Thanks @R0J0hound, but I believe this would ensure a dynamic built path ( which is also very useful! ). Maybe I wasn't clear enough earlier: I need to remove and/or add elements to the string of sprites following the path, not elements of the path itself. The challenge would be to make space for the new come or to fill the gap made by the destruction of a sprite.
B
16
S
4
G
3
Posts: 46
Reputation: 2,875

Post » Thu Oct 11, 2012 11:57 pm

[QUOTE=R0J0hound] Here is a way to do a spline though waypoints:
http://dl.dropbox.com/u/5426011/examples%208/catmullrom.capx

A plugin could be made to hide the formula, but there isn't a way to make an in IDE node editor at this time.[/QUOTE]

Question is will we ever get that ability?

Perhaps someone should come up with an external editor. It's not like it has to be just for paths.
Image Image
B
161
S
48
G
90
Posts: 7,347
Reputation: 66,749

Post » Mon Nov 05, 2012 2:05 pm

Sorry to bump and old thread. I'm trying to use ROJOhound's formula for an NPC. Does anybody know how to make is so when the NPC is destroyed, it returns to the spawning position. At the moment it just picks up where it left off.
B
3
Posts: 2
Reputation: 529

PreviousNext

Return to Construct 2 General

Who is online

Users browsing this forum: DankP3, KaMiZoTo, Zonacas and 5 guests