Strength of Jump/Time button held

TheBoss_123TheBoss_123 Member Posts: 60
edited November -1 in Working with GS (Mac)
Hey Forum,
is there anyway to change the strength of the jump depending on how long the button is held?
Cheers
TheBoss

Comments

  • mangaroomangaroo Member Posts: 419
    here is one way create a rule for the jump button - when pressed =
    change global attribute ButtonPressed = true

    otherwise or when released
    change button pressed to false

    then on your character (that jumps) put a rule when button pressed is true
    then inside create a timer every 0.05 seconds change linear y motion to ... try 50-125 (depends on your gravity setting for one) - while button pressed is true it will pump your character with a set motion - should accomplish the job
  • TheBoss_123TheBoss_123 Member Posts: 60
    Hey mangaroo,
    It worked, many thanks
    Cheers
    TheBoss_123
  • TheBoss_123TheBoss_123 Member Posts: 60
    One more thing:
    How do I set a maximum?
  • mangaroomangaroo Member Posts: 419
    well one way without changing too much currently would be to go to the button's rule for when pressed and start a timer - after 0.8 seconds change buttonpressed = false [Don't run to completion]
  • TheBoss_123TheBoss_123 Member Posts: 60
    Yep that worked too.
    Cheers
Sign In or Register to comment.