Enemy spaceship - Angle of movement?

Get help using Construct 2

Post » Tue Jun 03, 2014 3:39 am

Hey guys, had a search but couldn't find something on the forum so far.

I have a top down space game. I'm having trouble getting the enemy ships to face the direction of movement.
Have tried a few methods with bullet and MoveTo behaviours but they're not quite working out, I'm sure there's a simpler technique I am missing.
Any ideas?
B
7
S
2
Posts: 24
Reputation: 569

Post » Tue Jun 03, 2014 4:43 am

Hmm ok let me update this a little.
Currently I have the enemy ships able to make passes at the player and shooting before getting to the edge of the screen and turning around to repeat the attack. With bullet behaviour this is easy enough to get the direction of movement to be consistent, but am wondering if there is a way to allow the enemy to make a smoother turn. Like 8 direction smoothness applied to a bullet kinda thing.
B
7
S
2
Posts: 24
Reputation: 569

Post » Tue Jun 03, 2014 6:04 am

Every tick -> Spaceship -> Rotate 5 degrees toward angle(Player.X, Player.Y, Self.X, Self.Y)
B
33
S
6
G
7
Posts: 339
Reputation: 7,426

Post » Wed Jun 04, 2014 11:25 pm

Ahhh that's it. Very helpful, thanks ^ ^
B
7
S
2
Posts: 24
Reputation: 569


Return to How do I....?

Who is online

Users browsing this forum: brunopalermo, GrogIsGood, plinkie, rayolf and 7 guests