Perform a homing attack in sonic games

Get help using Construct 2

Post » Tue Jan 31, 2017 7:34 pm

how do i do the homing attack as sen in sonic games? like when sonic is in range of the enemy, he performs a homing attack. Anybody knows how to do this?
B
31
S
13
G
3
Posts: 133
Reputation: 4,168

Post » Wed Feb 01, 2017 2:19 am

Conditions -

Player - Pick nearest enemy
Compare two values - distance(player.x,player.y,enemy.x,enemy.y) is less than HomingDistance

Action -
Player - Move at angle - angle(player.x,player.y,enemy.x,enemy.y), distance 1
Mistakes were made.
B
52
S
26
G
109
Posts: 1,615
Reputation: 61,651

Post » Wed Feb 01, 2017 2:31 am

i dont think that worked
B
31
S
13
G
3
Posts: 133
Reputation: 4,168

Post » Wed Feb 01, 2017 3:15 am

Thats kinda like the method i use for when doing homing missiles.
B
94
S
33
G
11
Posts: 278
Reputation: 12,724

Post » Wed Feb 01, 2017 1:47 pm

Did someone says homing missiles? I kinda have an example for that: viewtopic.php?f=180&t=106616
ImageImage
B
108
S
49
G
23
Posts: 783
Reputation: 22,611

Post » Wed Feb 01, 2017 3:13 pm

Well thanx guys for your help
B
31
S
13
G
3
Posts: 133
Reputation: 4,168


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 48 guests