[SOLVED] Windmilling bullet fans (Angle conflict)


In my POC, I’m testing out bullet patterns, and I can’t seem to find a proper solution to this problem I’m having.

This is gonna get complicated, so I’ll illustrate what you need to know

The bullet “fan” is the spread distance between multiple bullets. Windmilling is when a bullets shoot out in a rotational manner, sort of like a windmill.

Both of these values need angle adjustments to work, and of course, they will conflict when used together.

I want a bullet fan to windmill, but both apply their increments to the angle value, making the windmilling too fast for my liking.

Is there a way to fix it?

Can you just add fanSpread to fan fan bullets, and add (fanSpread + rotateAngle)/2 for windmill?

It didn’t work

Even though your solution is clever, I’m still adding fanSpread in the event above, which just reverts the change. Is there some way to prevent the second fanSpread equation from happening?

No, I meant to have 2 subevents under that “Repeat guy.variable(bulletAmount) times” block - one to only add a force for fan bullets (fanSpread), another to only add a force for windmill bullets ((fanSpread + rotateAngle)/2).

You’re still adding fanSpread for all bullet types, rather than just fanning bullets.

If you must have the fanSpread in the same event as the create action, then maybe changing the last action to “(guy.Variable(rotateAngle) - guy.variable(fanSpread))2”. Otherwise you’re adding 1.5 lots of fanSpread.

Oh, thanks for the clarification.

It didn’t work though. Did I do it wrong? Or is there something else that has to be done? If it helps, the windmill variable is set to be a boolean

Just having another look at what you’ve provided, and it looks like it’s just the bit that gives the bullet the initial push once it’s created. Are there more events that add a force to the bullet, to get it to rotate around the player as it fans out?

Well, not really. Those are the only events that add force to the bullet, aside from the spiraling bullets from earlier (Provided here)

Even then, these are state locked, so the other state can’t access these events. Otherwise, everything that makes the bullets move (Excluding the spiraling bullets) are all in the previous screenshot

Sorry, I’m a tad confused. How do the windmilling and spiralling bullets differ in their movement pattern? Any chance you show the difference in a gif?

Okay, it can be kind of confusing, so I’ll provide examples to describe the issue.

Also, in the GIFs, just ignore the guy on the left. The middle guy is the one testing this for me.

Here’s a fan of 3 bullets with a spread of 10:

Here’s the bullets windmilling, with a rotation speed of 50:

And here’s what happens when I try to windmill that 10 spread fan:

You can see that the fan is windmilling too fast, when I actually want the fan to windmill like the second GIF.

Both of these values conflict angle, so is there a way to individualize them?

So do you effectively want 3 streams (like the fan) but coming out windmill style? Because in the 3rd image it pretty much comes out as a fast windmill - the 3 streams seem to merge into 1.

Yeah, I know. But is it possible to slow it back down again?

Definitely. The problem looks like you increment the angle at which the bullets are fired 3 times, but the angle is never reset before adding the rotation speed. The following should fix it :

Even though this does make the code cleaner, unfortunately, it just makes the bullets windmill even faster


This also affects the normal windmilling too, causing that to windmill faster too. Is the multiple of 3 necessary for this, or would it be better of as an expression call?

No, you’ve got the * 3 in the wrong place. Look at my last event closely; it’s rotateAngle - fanSpread*3.

It’s moving back 3 lots of fanSpread, and moving forwards 1 rotateAngle.

Oooh, I see now. It works perfectly now, thanks ^^