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
36
S
15
G
3
Posts: 147
Reputation: 4,521

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
54
S
28
G
115
Posts: 1,705
Reputation: 65,083

Post » Wed Feb 01, 2017 2:31 am

i dont think that worked
B
36
S
15
G
3
Posts: 147
Reputation: 4,521

Post » Wed Feb 01, 2017 3:15 am

Thats kinda like the method i use for when doing homing missiles.
B
98
S
35
G
11
Posts: 289
Reputation: 13,082

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
114
S
51
G
24
Posts: 790
Reputation: 23,480

Post » Wed Feb 01, 2017 3:13 pm

Well thanx guys for your help
B
36
S
15
G
3
Posts: 147
Reputation: 4,521


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 11 guests