Adding segments to a rope/tail?

0 favourites
  • 1 posts
From the Asset Store
Heads N Tails is an educational Ludo game of probability with visualization and in fun manner.
  • Hi!

    Capx file here:

    www1.datafilehost.com/d/00c621cc

    So I have a cat with a tail, the tail is made of segments joined together by the Pin behaviour. I want to be able to add segments to the tail at runtime, but I'm not too sure how to go about it.

    The problem is that each segment has to be correctly pinned to the preceding segment, so the code has to be able to identify how many segments there are... I suppose I could use the count functionality to determine the number of instances and then use an asston of IF statements to determine where to add the segment.

    A further problem is adding the segment in the right place, the best way to do this is to call the "create object" function from the preceding segment and then attach the new segment to an image point. But I'm not sure how to make that work correctly at runtime no matter how many segments you already have.

    Any help would be great!

    And feel free to use the tail script for whatever, it's not perfect but I'm pretty pleased with how it works.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)