Wrap + Pin Rope = Trouble :(

Get help using Construct 2

Post » Wed Jan 15, 2014 11:25 pm

Hi guys. Long time without participating here!

I have a snake-like character (If you ever played Megaman X, it should be like those Eel like enemies from Launch octopus stage)

Its head moves on a invisible tile that server as a "rail" to it. Its body is divided in 5 parts. all of them pinned one to another as "Rope".





I would like to have this snake wrap around the screen boundaries, but I am facing the problem below:





Is there any clever way to make it wrap around the screen without this weird stuff happening?

Thanks in advance!
B
12
S
6
G
3
Posts: 102
Reputation: 3,937

Post » Thu Jan 16, 2014 9:19 am

Anyone?
B
12
S
6
G
3
Posts: 102
Reputation: 3,937

Post » Thu Jan 16, 2014 9:24 am

well, I believe that if you remove the Sine behavior, this will no longer occur
Open for Commission, contact email > [email protected]



my personal website with news in my game developer adventure! |

adult ( 18) pixel art games
B
135
S
24
G
21
Posts: 513
Reputation: 24,961

Post » Thu Jan 16, 2014 10:22 am

Hi gilenew, thanks for answer!

Even without the Sine behavior (I have other similar character whose parts doesn't feature it) the problem persists.

I think that the problem is the Pin. Once the head wraps around the screen, the other parts follow it before they make it through the screen boundary.

But I can't find a better solution to create this snake. =/
B
12
S
6
G
3
Posts: 102
Reputation: 3,937

Post » Thu Jan 16, 2014 11:18 am

uhm, I don't know if will work the way I'm thinking, but try to use a function to create and another to destroy the object (or just change his position without having to use the wrap)
that way you can call this function whenever your object go out of one side of the screen
Open for Commission, contact email > [email protected]



my personal website with news in my game developer adventure! |

adult ( 18) pixel art games
B
135
S
24
G
21
Posts: 513
Reputation: 24,961

Post » Thu Jan 16, 2014 5:10 pm

To build of what gillenew said, try using the "Set to position of another object" to act as a teleport for your sea monster.

Create two small sprites, once the sea monster overlaps the sprite off screen to the right, set to the position the the other sprite that's off screen to the left. If the body parts don't follow, destroy and recreate and pin again after the position is set to the sprite on the left.Boony2014-01-16 17:15:14
B
14
S
3
G
1
Posts: 87
Reputation: 1,103


Return to How do I....?

Who is online

Users browsing this forum: brunopalermo, Nicolas951, tarek2 and 8 guests