I would like to make a charging enemy.
(Top down game)
Enemy going random straight direction at speed 80 (as a bullet)
When the enemy reaches 500 pixels away from the player it stops and adjusts it's angle to the player for 1 second
Then it charges in that direction at 200 speed without changing for 3 seconds.
after charging it will wait 2 seconds before setting it's speed back to 80 and randomly setting it's angle and moving again.
When I tried to do this it would work the first time but then once the enemy goes back to normal it was very choppy and didn't work.
If anyone can post their way of doing this it would be very helpful and I would appreciate it a lot.