I have a bullet projectile with gravity on it, and I want to experiment with holding the fire button as a way to prolong the strength of the gravity. I understand how to do this with platform behavior, but not for a bullet.
This is how I do it for the player's platform behavior.
Decrease speed and gravity by some amount on button push?
the speed works, but I'd rather have it modify just the gravity, and it's strange because gravity is not an expression for spritename.bullet
So I got my desired effect by splitting it up into two events based on the button status.
It's ugly and needs tuning but it works. However, my one last issue is that when you quickly shoot two of these bullets on screen at once, the holding affects both of their gravitys. I want the end projectile arc to be permanent for that projectile once you let go of the firing button. I tried experimenting with on button released but it yielded the same results.
Develop games in your browser. Powerful, performant & highly capable.
Have you tried adding an instance variable "Gravity" to the vials, setting it the the gravity you want, and then setting bullet gravity to Self.Gravity?
Yep, that works. Thanks!