Strength of Jump determined by Button Press Time

I want the actor to jump at a certain power/strength based on the time the jump button is pressed for. I also want the actor to jump only after the button is released. I have been able to get this to work on button press, but not release.

Anyone have any ideas?

Comments

  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    well you would have to time the amount of time the button was held down
    and then run all of your jump rules based on that when touch is released
  • KenAdamsKenAdams Member Posts: 4
    Thanks, how would I go about timing the button?
  • JarrenHJarrenH Member Posts: 206
    At the moment of the button being pressed, save the actors self.time to an attribute. Then when mouse is released, subtract the saved attribute from the actors self.time. This will give you the length of time the button was held down. It's up to you why to do with it from that point.
  • KenAdamsKenAdams Member Posts: 4
    Ah yes, thank you very much. It seems to have worked
Sign In or Register to comment.