sinanqd10 Posted January 19, 2015 Share Posted January 19, 2015 Can anyone guide me the way to do a jump on P2? I have read this article about the jump on P2 http://www.html5gamedevs.com/topic/6148-the-moving-jumpthrough-platform-sum-up-thread-help-very-much-appreciated/, but what I actually wanted is that: I want to jump depend on how I press the key : example: if I press slightly, it will jump a little and if I press hardly, it will jump high. please give me a demo. Thanks you for helping. Link to comment Share on other sites More sharing options...
valueerror Posted January 19, 2015 Share Posted January 19, 2015 the linked article has little to nothing to do with the jump itself.. its about platforms! player.body.moveUp(600); does the jump.. if you want trigger a jump depending on the pressure of your buttonpress you would need something like a pressure sensitive gamepad for that.. you can't do that with a normal keyboard.. it's digital.. on or off.. you probably could try making the jumpheight dependend on the duration of the press.... sinanqd10 1 Link to comment Share on other sites More sharing options...
sinanqd10 Posted January 21, 2015 Author Share Posted January 21, 2015 @valueerror thanks you for helped. Can I ask some more questions about sprite?Eg: I have 3 sprites which are flying randomly from right to left of the game world? Can you give a demo or example? Thanks you a lot ! Link to comment Share on other sites More sharing options...
Recommended Posts