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
38
S
15
G
3
Posts: 148
Reputation: 4,573

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
58
S
29
G
115
Posts: 1,717
Reputation: 65,307

Post » Wed Feb 01, 2017 2:31 am

i dont think that worked
B
38
S
15
G
3
Posts: 148
Reputation: 4,573

Post » Wed Feb 01, 2017 3:15 am

Thats kinda like the method i use for when doing homing missiles.
B
101
S
35
G
11
Posts: 295
Reputation: 13,184

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
123
S
54
G
24
Posts: 794
Reputation: 24,042

Post » Wed Feb 01, 2017 3:13 pm

Well thanx guys for your help
B
38
S
15
G
3
Posts: 148
Reputation: 4,573


Return to How do I....?

Who is online

Users browsing this forum: Google [Bot] and 27 guests