I have a tbs 2-player game with a unit (the drone) that is supposed to have weak homing on its attacks which works fine when shooting left to right but when the shot is going right to left it turns around and moves randomly until it exits the homing range. Can anyone help?
The homing code:
The full game:
1 Like
Can’t you just use the follow block or something?
No because I want the bullets to have a chance of missing if they turn too slowly
1 Like
That’s exactly what I was thinking. Also what’s all those “ + convert ( 360 ) degrees to radians” for? Doesn’t that do literally nothing? Anyways there’s a chance that’s your problem, but I’m too lazy to actually think through the implications of that, so it might be the problem. It might be random because shooting right to left doesn’t cross a 360 → 0 wrap around? Like maybe somehow that wrap around is helping this code work, but when you go the other way the code is all messed up? Idk.
I usually answer every help question I see, but I’m a bit short on time atm so I’ll revisit this sometime later if you haven’t solved it by then.
Also what’s all those “ + convert ( 360 ) degrees to radians” for? Doesn’t that do literally nothing?
I put those there just to make sure that there wouldn’t be any positive + negative = bug. The bug was happening before I added those.