How do I Make a movingplatform that follows a specific path?

Get help using Construct 2

Post » Sun Sep 04, 2016 12:02 am

I want to make a moving platform that follows a specific path that I'll set. How would I go about doing that?
B
24
S
9
Posts: 109
Reputation: 2,002

Post » Sun Sep 04, 2016 12:54 am

I'm also trying to create this or something similar to this. I've collected a couple of different capx examples and posts. I'm trying to create some sort of roller coaster or rail system. Nothing working yet but if I figure it out, I'll post it. You might want to check this tutorial. Could be a way to possibly create a platform to move a long a path

https://www.scirra.com/tutorials/1367/a ... -waypoints

A possible easier way to create what you trying to create would be to use the Rex spline plug in behavior. Check out the demo.

behavior-rex-spline_t178563
B
28
S
14
G
21
Posts: 179
Reputation: 13,548

Post » Sun Sep 04, 2016 2:22 am

Agreed. Rexrainbow's Spline is the best.

I always make moving platform games with Rexrainbow's MoveTo behavior, because it's easier to use.

Here's an example that utilizes both behaviors.

https://www.dropbox.com/s/19f5nvibm1fxr ... .capx?dl=0

Rexrainbow's MoveTo - behavior-moveto_t63156
Rexrainbow's Spline - behavior-rex-spline_t178563?start=40
B
11
S
6
G
15
Posts: 256
Reputation: 9,207

Post » Sun Sep 04, 2016 2:53 am

@Gmoney Hey I tried to use your capx example but it won't open. It's giving me an error saying I'm missing "Behavior "Line" by Rex.Rainbow. I have the folders for both MoveTo and Spline in my behaviors folder.
B
28
S
14
G
21
Posts: 179
Reputation: 13,548

Post » Sun Sep 04, 2016 3:52 am

heyguy wrote:@Gmoney Hey I tried to use your capx example but it won't open. It's giving me an error saying I'm missing "Behavior "Line" by Rex.Rainbow. I have the folders for both MoveTo and Spline in my behaviors folder.


Please try again after downloading and installing the latest version of Rexrainbow's MoveTo and Spline behaviors.

Mine were last updated yesterday by using Rexrainbow's Plugins repository v2.

app-my-plugins-repository-v2_t69775
B
11
S
6
G
15
Posts: 256
Reputation: 9,207

Post » Sun Sep 04, 2016 4:00 am

@Gmoney I think I do have them installed. I'm actually able to use MoveTo and Spline within the editor. I have both MoveTo and Spline installed into my C2 behaviors folder. I can add those behaviors to sprites in-game. I just can't seem to open the the capx for some reason. Do I have to drag and drop something into the C2 editor to fully install it?

@Aquanex2 Check this capx out. I think this makes moving waypoint to waypoint or along a certain path pretty easy if you'd rather not use plug ins. I found it yesterday and only started tweaking with it but I like the results so far!

https://www.dropbox.com/s/9n73n98zux3cy ... .capx?dl=0

edit: forgot the capx! Thanks @Gmoney will download the newest versions and try again!
B
28
S
14
G
21
Posts: 179
Reputation: 13,548

Post » Sun Sep 04, 2016 1:39 pm

heyguy wrote:@Gmoney I think I do have them installed. I'm actually able to use MoveTo and Spline within the editor. I have both MoveTo and Spline installed into my C2 behaviors folder. I can add those behaviors to sprites in-game. I just can't seem to open the the capx for some reason. Do I have to drag and drop something into the C2 editor to fully install it?

edit: forgot the capx! Thanks @Gmoney will download the newest versions and try again!


You're welcome, heyguy.

I always use Rexrainbow's Plugins repository v2 to install bahaviors and plugins, but copying and installing them to the C2 behaviors folder will work as well.

Please let me know if you're still not able to open the capx document. I'll post screenshots, copy and paste the event sheet details, and upload the final result animation. :mrgreen:
B
11
S
6
G
15
Posts: 256
Reputation: 9,207

Post » Sun Sep 04, 2016 3:35 pm

@Gmoney Amazing! Thanks for the plug in repository and capx! I downloaded everything I needed and updated them all. Rex Spline is great! This is exactly what I needed. I imagine I can create some sort of Donkey Kong style tram car ride or something similar very easily with this!
B
28
S
14
G
21
Posts: 179
Reputation: 13,548

Post » Sun Sep 04, 2016 4:46 pm

heyguy wrote:@Gmoney Amazing! Thanks for the plug in repository and capx! I downloaded everything I needed and updated them all. Rex Spline is great! This is exactly what I needed. I imagine I can create some sort of Donkey Kong style tram car ride or something similar very easily with this!


You're always welcome, heyguy. :mrgreen: Rexrainbow's Spline will make a great roller coaster or rail system.
B
11
S
6
G
15
Posts: 256
Reputation: 9,207

Post » Mon Sep 05, 2016 12:59 am

@aquanex2 So I've created another way to create "movement that follows a specific path". I'm using bullet behaviors with invisible sprites that change the bullet speed and bullet angle of the player. I experimented and came up with 3 different ways to create movement along a path. I'm using the pathfinding behavior, the rex spline behavior and the bullet behavior. Take a look at my capx! I'm pretty happy with how it came out. Just need to add a reverse function to it now. I'm not moving a "platform", I'm moving the player but I imagine it'll be easy to change.

Image

@Gmoney I modified your spline example to suit purposes. I want to move the player along the spline path when they collide with the object that travels the spline path. When the player collides with the object, they'll be pinned to it and the path function will run. I'm having a few issues. For some reason the zipline object on the path moves right at the start of layout. When it's being ridden, the zipline will actually leave the screen instead of stopping at point B. I'm unsure how I stop the ride and "disembark" the player and end the function. Would a sprite that unpins the character do that? Here's a gif of how the spline behavior is working.

Image

https://www.dropbox.com/s/yhsbxeiuz3350 ... .capx?dl=0
B
28
S
14
G
21
Posts: 179
Reputation: 13,548

Next

Return to How do I....?

Who is online

Users browsing this forum: Laura_D, rayolf and 26 guests