Wrap + Pin Rope = Trouble :(

0 favourites
  • 6 posts
From the Asset Store
Surena Touch
$2.50 USD
A wrap from official Touch plugin to export touch/mouse input to other plugins.
  • 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".

    <img src="http://i10.photobucket.com/albums/a126/shinobi_br/rails_zps72d0e27a.png" border="0" />

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

    <img src="http://i10.photobucket.com/albums/a126/shinobi_br/wrap_problem_zpsed260f50.gif" border="0" />

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

    Thanks in advance!

  • Anyone? <img src="smileys/smiley19.gif" border="0" align="middle" />

  • well, I believe that if you remove the Sine behavior, this will no longer occur

  • 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. =/

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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

  • 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.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)