Variate jump height depending on length of time touched?

MeaningfulGamesMeaningfulGames Member, PRO Posts: 171
edited September 2012 in Working with GS (Mac)
Hey its Vincam again,
I;m not sure if this is beyond the limits of this engine, but I'm thinking of a game where the character jumps higher the longer the touch is held (essentially, motionLinearVelocityY can variate). Could anybody think of a solution for this?

Thanks community.

Comments

  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    Just add a timer that adds to the velocity every whatever seconds.
  • MeaningfulGamesMeaningfulGames Member, PRO Posts: 171
    My previous code had an actor which was invisible across the screen. When touch was inside this actor, game.jump = 1 - when touch was released game.jump = 0
    On my hero, when game.jump = 1 , set motion linear y to 560 to make it jump.
    When game.jump = 0 then accelerate down (direction 270) at an acceleration of 1000. If I add the timer with the change velocity rule it doesnt work - where should i be editing my code? I'm a bit confused.
    Thanks a lot!
  • MantoManto Member Posts: 796
    Made a little template for you. Download
Sign In or Register to comment.