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

Get help using Construct 2

Post » Mon Sep 05, 2016 1:36 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
30
S
15
G
22
Posts: 183
Reputation: 14,221

Post » Mon Sep 05, 2016 1:42 am

heyguy wrote:@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


That's really neat! Nice job! :D
B
24
S
9
Posts: 109
Reputation: 2,002

Post » Mon Sep 05, 2016 5:19 pm

Wow! Amazing work, heyguy! :mrgreen:

Here's a modified example file.

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

Player character no longer travels off screen, and it disembarks once the spline path travel ends.

This is how I have fixed the issue

1. I found obj_ziplineSpline had a bullet behavior enabled. I tried disabling the bullet behavior, and it stopped traveling to the right after reaching the last spline path.
2. I unpinned both Player and Playerbox after waiting for 5 seconds and re-pinned Player to Playerbox.

Again, amazing job, heyguy! :mrgreen:

This is so far the best zip line,roller coaster, barrel and path finding move example I've ever seen. Great job!! :mrgreen:
B
11
S
6
G
15
Posts: 256
Reputation: 9,207

Previous

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 28 guests