Jetpack Jump System?

What is the best way to implement a jetpack in a 2D platformer? I've thought about implementing a timer-system by reducing 'Jetpack.amount by 1 every xseconds that the button is held down' but I doubt it would account for quick, light bursts... any better ideas?

Comments

  • Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273

    Could you not use accelerate up when touch is pressed, and use accelerate for gravity when touch is released?

  • RickkidcoolRickkidcool Member Posts: 12

    Well you could make a rule saying if button pressed, then accelerate 400 in direction 90. Then, put under otherwise, accelerate 400 in direction 270. Hope this helps!

  • RickkidcoolRickkidcool Member Posts: 12

    also, if you want it for a limited time, you can make a attribute called "fuel jetpack" then, In the rule I explained earlier, add a new rule inside it saying if attribute "fuel jetpack" is greater than 0. then below that rule, add a timer saying every 0.5 seconds or whatever you want, change attribute by self.fueljetpack-1. then. add a new rule out of all that if touching actor (whatever the ground is) set fuel jetpack to 10 or 50 or whatever you want. hope this helps even more!

  • FrazzleFrazzle Member Posts: 223

    It works - thanks for the help!

    FM

Sign In or Register to comment.