Ziplines!

0 favourites
  • 13 posts
  • I've been messing around a while but can't achieve what I want. How would I go about making a zipline in a platform game? I'm trying to have; the player to be able to use it, the player speeds up the longer he rides it, it automatically dismounts player at the end and player can manually dismount. I've put put an image point on his hand but don't know how to make him follow the zipline. Should I use a bunch of combined sprites or just make separate ones for each zipline?

  • Sprite - Move at angle angle( ziplineStart.X, ziplineStart.Y, ziplineEnd.X, ziplineEnd.Y )

    Have some invisible Sprite placed near the end of the zipline too, for when the player collides so they'll dismount.

    Easier said than done I know, but I hope you get the logic ;)

  • Sprite - Move at angle angle( ziplineStart.X, ziplineStart.Y, ziplineEnd.X, ziplineEnd.Y )

    Have some invisible Sprite placed near the end of the zipline too, for when the player collides so they'll dismount.

    Easier said than done I know, but I hope you get the logic ;)

    I don't quite get what you are suggesting, I currently have the player set to player.X + 5 and zipline.Y + 5 every tick while colliding w/ zipline but it's clunky and inaccurate, rather than spamming the object could I have it switch image points?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Or just make the cart a bullet and set angle of motion to (Zipline.Angle+45) ...

  • You don't need to check for collisions every tick. At first, sure, check for the inital collision with an invisible sprite at the start of the zipline. Then if collided with that sprite, set a variable "isOnZipline" to true. Disable platform behaviour. While that variable is true, then move at angle. Until it collides with another invisible sprite at the end of zipline, then set the variable to false and enable platform behaviour. Should dismount automatically using the gravity from the platform behaviour.

  • Or just make the cart a bullet and set angle of motion to (Zipline.Angle+45) ...

    Well the zipline isn't just a line, here, I drew an example. I would have this over the actual object(s) he ziplines on. I suppose I would be able to do it with a bunch of individual objects, but is their no more efficient way?

    Edit: I tried what I just said and it look horrible, the player just glitches around to each segment.

    You don't need to check for collisions every tick. At first, sure, check for the inital collision with an invisible sprite at the start of the zipline. Then if collided with that sprite, set a variable "isOnZipline" to true. Disable platform behaviour. While that variable is true, then move at angle. Until it collides with another invisible sprite at the end of zipline, then set the variable to false and enable platform behaviour. Should dismount automatically using the gravity from the platform behaviour.

    Right, but what you said with the angle seemed a bit off.

    <img src="https://dl.dropbox.com/u/44188718/Help/zippy.png" border="0" />

    Thanks for all the feedback!

  • Use the same method of setting its angle of motion, and then add numerous invisible sprites along the line where it turns and adjust the angle.

  • Use the same method of setting its angle of motion, and then add numerous invisible sprites along the line where it turns and adjust the angle.

    Like vectors !

  • Well it's rather clunky and inefficient but it's the best I could do. Thanks everyone for your help, if anyone wants to make this better, PLEASE tell me.

    Zipline

  • I think that looks pretty damn good. Maybe when you "disengage" the zip line-ing, give him a little push to the right and up a bit. Because a person isn't going to just stop and fall off, they still have momentum.

  • ANOYEN' DEATH SOUND ! DAMN YOU DRASPUR !

  • I think that looks pretty damn good. Maybe when you "disengage" the zip line-ing, give him a little push to the right and up a bit. Because a person isn't going to just stop and fall off, they still have momentum.

    It'll work I suppose, hopefully it'll look better with the proper animation. I had the zip-line end set player vector to zero because for some reason it was making him jump, I already have it push him right but I agree it should be stronger. Note, I had to go in and draw a fake zipline.

    ANOYEN' DEATH SOUND ! DAMN YOU DRASPUR !

    You don't like it? <img src="smileys/smiley6.gif" border="0" align="middle" />

  • hey guys, im slightly new to construct 2, i know most of the basics, would someone be able if yo have time, to upload a dropbox of the zipline?? im currently making a game, and hopefully add the zipline to it, thanks!!

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