There isn’t a best way. There are many different ways like I roughly listed in the previous post, each with pros and cons. But realistically you’d just pick one.
Create a sprite and call it node. Give it two instance variables: path and index. You’d then place instances of node on the layout in the shape of the path you want. Next you’d set the instance variable values. You’d set index to 1 for the first node, 2 for the second, and so on. You’d then set path to the same value 1 for all of them. You can create more paths later by just having different values of path.
Next you need something to follow the path. Create a sprite and call it mover. Give it two instance variables: path and target. Also give it the bullet behavior.
In events you’d then do something like
Start of layout
— mover: destroy
On click
Node: path=1
Node: index=1
Repeat 10 times
— create mover at (node.x-loopindex*32, node.y)
— mover: set path to 1
— mover: set target to 1
For each mover
Node: path=mover.path
Node: index= mover.target
— mover: rotate 100*dt degrees toward (node.x,node.y)
Mover: on collision with node
Node: path=mover.path
Node: index= mover.target
— mover: add 1 to target
You can change the rotation speed by changing 100*dt. You probably want to change the bullet speed too. Too fast with too slow of turning will prevent it from being able to reach the next node, but that’s easy to tweak. You can change the amount and spacing of the movers in the event that creates them. You probably want to delete the movers once they reach the end of the path somehow.
As an exercise you could also stretch a sprite between consecutive movers to avoid visual gaps.
Edit:
Third party plugins are useful, but users seem to avoid them because they don’t like that the people that made them don’t usually stick around till the end of time to fix possible issues that come up from browser or construct change. You’re already using c2 that could possibly break from a browser change although that’s not very common. As to if third party plugins make it harder to port? That’s a question for those who do the porting.
Dude, I tried to adapt your code to my routine (which procedurally generates a wind particle every 2 seconds on the right side of the screen, making it go to the left side), but I just couldn't do it. Maybe it's tiredness and/or inability to program, but now I couldn't do it. :(
I tried to use AI to help me with the routine, but it only made the situation worse. If it's not too much trouble, could you create a CAPX example for me with this context?