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
27
S
12
G
3
Posts: 122
Reputation: 3,946

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
49
S
24
G
107
Posts: 1,581
Reputation: 60,303

Post » Wed Feb 01, 2017 2:31 am

i dont think that worked
B
27
S
12
G
3
Posts: 122
Reputation: 3,946

Post » Wed Feb 01, 2017 3:15 am

Thats kinda like the method i use for when doing homing missiles.
B
81
S
26
G
9
Posts: 244
Reputation: 10,616

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
101
S
45
G
22
Posts: 772
Reputation: 21,468

Post » Wed Feb 01, 2017 3:13 pm

Well thanx guys for your help
B
27
S
12
G
3
Posts: 122
Reputation: 3,946


Return to How do I....?

Who is online

Users browsing this forum: Lancifer, Yahoo [Bot] and 5 guests