Get Sprites to hone in on the player?

Get help using Construct 2

Post » Wed Dec 19, 2012 2:41 am

It may sound easy, but it's not. For me anyways. I wanted some asteroids to constantly mozzie on their way tot he player. It worked before, every tick they set their angle to Player.X/Y. Then I tried to make them rotate, and everything went wrong. I took away their spin behavior, and now they don't spin, but now they also don't go to the player. They do, however, twitch, like it's trying to rotate or change position. Any way to get these stupid rocks to attack me?
B
6
Posts: 90
Reputation: 690

Post » Wed Dec 19, 2012 2:45 am

I fixed it; I just had to say 'yes' to a certain behavior. Let
s hope the spin doesn't mess it up...
B
6
Posts: 90
Reputation: 690

Post » Wed Dec 19, 2012 4:22 pm

For such an endouvar I like to use
Bullet behaviour
with set angle to motion as OFF/NO

per tick
bullet: Set angle of motion angle(asteroid.xy, player.xy)
bullet: set rotate angle z
B
87
S
18
G
9
Posts: 2,455
Reputation: 14,834

Post » Thu Dec 20, 2012 8:53 pm

Are you making the bullet go toward the player, or the asteroid?
B
6
Posts: 90
Reputation: 690

Post » Thu Dec 20, 2012 9:06 pm

" I wanted some asteroids to constantly mozzie on their way tot he player. "

I am referencing to the Bullet Behaviour on the asteroid; and not the bullet the player shoots at an asteroid.
B
87
S
18
G
9
Posts: 2,455
Reputation: 14,834

Post » Thu Dec 20, 2012 9:21 pm

Thought so. I see what you mean, thanks.
B
6
Posts: 90
Reputation: 690


Return to How do I....?

Who is online

Users browsing this forum: Braus, MatheusCastellar, shinkan and 26 guests