Making a drag option / making a ramp - HElp! can't explain =P

stackpoolestackpoole Melbourne, Victoria, AustraliaMember, PRO Posts: 473
edited May 2012 in Working with GS (Mac)
Hi there, I am wondering if you can do the following

=> So basically, I have an actor which is just a long strip/line, and I want to make it ramp, so the car actors in my game can use the ramp to speed off, going up, or other stuff..

=> I want to make the possibility so that the player, can drag this ramp up or down.. so the player has to figure out the perfect height for the ramp to be able to finish the level.

I hope you know what I mean, not the best explanation, please tell me if you need more info!

Thank you!

Sydney Swans 2014!!

Best Answer

  • MotherHooseMotherHoose Posts: 2,456
    Accepted Answer
    @brendanzh926

    to make a line/strip as a ramp … change its Rotation attribute

    for playerDrag rotation of the ramp:
    Rule: when
    Event: touch is pressed
    --constrainAttribute: self.Rotation To:
    vectorToAngle(game.Touches.Touch 1.X- self.Position.X , game.Touches.Touch 1.Y - self.Position.Y )

    image MH

Answers

  • stackpoolestackpoole Melbourne, Victoria, AustraliaMember, PRO Posts: 473
    @brendanzh926

    to make a line/strip as a ramp … change its Rotation attribute

    for playerDrag rotation of the ramp:
    Rule: when
    Event: touch is pressed
    --constrainAttribute: self.Rotation To:
    vectorToAngle(game.Touches.Touch 1.X- self.Position.X , game.Touches.Touch 1.Y - self.Position.Y )

    image MH
    @motherhoose hi thanx , will give it a try and give feedback!

    Sydney Swans 2014!!

  • stackpoolestackpoole Melbourne, Victoria, AustraliaMember, PRO Posts: 473
    @motherhoose
    EXCELLENT! :) thnx a lot

    Sydney Swans 2014!!

Sign In or Register to comment.