Jetpack Jump System?
Frazzle
Member Posts: 223
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
Could you not use accelerate up when touch is pressed, and use accelerate for gravity when touch is released?
My GameSalad Academy Courses! ◦ Check out my quality templates! ◦ Add me on Skype: braydon_sfx
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!
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!
It works - thanks for the help!
FM