Greetings,
I’m currently trying to remake the parabolic arc example: GDevelop 5
My goal is to move everything into a function call to hopefully make it more intuitive and reusable (Plus, remove the “one-bullet-at-a-time” restriction).
So far, I got everything coded in, although, I’ve run into a problem…
You see, in the original example, there’s an extra event which makes the bullets move, but since I’m using a function call here, things get complicated…
When this event is IN the function, the bullets ONLY move when the function is running. Plus, ALL the bullets reset their trajectories and move again for some reason…?
When this event is OUTSIDE of the function, it just straight up doesn’t work since the arguments being used in the function don’t exist outside of it.
Here’s the code:
And the function (The code that moves the bullets is at the bottom):
Basically, how do I get the bullet to move while preserving the function’s reusability? Or am I trying to have my cake and eat it too?
Additionally, if I want each bullet to act individually, would I need to convert these scene variables to object variables instead?
Thanks in advance




















