Is there a way to have an actor slide down a rope?

chaleychaley Member, PRO Posts: 226
edited December 2011 in Working with GS (Mac)
I'm using Darren's jetpack template which is an endless runner, and at one point, I want the hero to slide down an angled rope so that basically, the hero is "stuck" to the rope for the entire length of it and is released when he gets to the end. Anyone know a good way to do that?

Comments

  • POMPOM Member Posts: 2,599
    I suggest to break this down to 2 separate elements ,
    1) the rope - simply a graphical actor with no rules .
    2) your sliding actor , use the interpolate behavior to interpolate its X and Y position along the rope ,
    Then have a rule that triggers once the sliding actor have reached its destination (use the X and Y values to check it) , and in that rule use another interpolate to imitate that he is falling down .

    Hope it will help you get started.
    Roy.
  • chaleychaley Member, PRO Posts: 226
    Thanks for the response. I'm still a little unclear how to set that up. If you can break down the specifics, that'd be AWESOME. This behavior would add a HUGE element to my game.
  • UtopianGamesUtopianGames Member Posts: 5,692
    edited December 2011
    In my platform template i used 2 lift actors so i could place them anywhere and have the hero move from point A to B or B to A.

    Done a quick video to show you the rules but basically when hero hits lift A it constrains to it and A moves towards B.



    Hope this helps.

    Darren.

    GS Templates & Tools + Xmas Bundles
  • chaleychaley Member, PRO Posts: 226
    Thanks Darren,

    I just bought the template. Seemed like there was some useful bits in there.
  • chaleychaley Member, PRO Posts: 226
    Shoot. I just tried to implement the attributes and the Hero freaks out. I think the Hero acceleration/motion from the Jetpack template conflicts with the constraints. I've tried to adjust the hero's setting to accommodate the switch, but nothing is working.
  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    Keep at it and check out the cookbook, it takes time to learn the ropes but you'll get it.
  • chaleychaley Member, PRO Posts: 226
    I'm getting a mixed bag of results. It's never quite right. The worst part about it is that it's not even that difficult of a move. When my main actor hits the "rope" actor that is slanted, I just need the path of the actor to mimmic the shape of the rope which is basically just a line at a 30 degree angle. It seems so simple, but everything freaks the scene out.
  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,881
    It is most likely the acceleration behavior on the Hero that is causing the problem. Acceleration is a persistent behavior (much like a constrain behavior), and will 'push through' a rope actor.

    One way to work this out would be to make the rope and hero as as frictionless as possible. Set the rope's density to very high, friction to 0, restitution to 0, fixed rotation to 'on', moveable to 'off'. Set the hero's density to very low, friction to 0, restitution to 0, fixed rotation to 'off', moveable to 'on', and collision shape to circle.

    Also, put a collide behavior in the Hero. (Collide with rope.)

    Using the above settings will make the hero and rope as slick as ice. That might help.

    Other then that, you might want to get rid of the accelerate behavior and use change velocity instead.

    Hope that helps,
    RThurman
  • chaleychaley Member, PRO Posts: 226
    Cool... I go check it out... thanks!
Sign In or Register to comment.