How do I make 2 types of missiles for 2 types of enemies

Get help using Construct 2

Post » Sat Sep 13, 2014 12:03 pm

Hello,

it's my second post,thanks for your help in the first one. I'm working hard on some tutorial, but I need some helps, I hope that the question has not already posted. If it's the case sorry , I didn't find it in the search option...

So my concern is, I've made a basic space shooter (thanks the first tutorial), but I would love to add complexity.

-I would love to add missile in the game that auto target the enemy (and not go straight like bullets), the enemies are moving too.

-And I would love to add 2 or 3 kinds of missiles types, each for one kind of enemy. So if you launch the wrong type missile, it just go straight (or other direction) but it will not touch the enemy. how can I do that ? of course it will have one button for each kind of missile.

Thanks in advance for your help!

have a great week end

NG
B
3
Posts: 8
Reputation: 189

Post » Sat Sep 13, 2014 11:24 pm

you could use bullet & turret behavior on the missle and set up the parameter so its only reacting to a specific enemy Type.
when the right enemy is in range change the angle towards it.

Its pretty basic but it should work
B
18
S
6
G
3
Posts: 197
Reputation: 4,129

Post » Mon Sep 15, 2014 7:13 am

Thanks for your help, I'll try that and let you know.

all the best

NG
B
3
Posts: 8
Reputation: 189

Post » Mon Sep 15, 2014 10:08 am

yonda wrote:you could use bullet & turret behavior on the missle and set up the parameter so its only reacting to a specific enemy Type.
when the right enemy is in range change the angle towards it.

Its pretty basic but it should work


Why use the Turret behaviour instead of LineOfSight? LOS would be better because it gets an LOS detection range of it's own of any angle you want, and Turrets would be more for turrets, not really expended ammunition flying through the air, :). Just curious in case there's a benefit to using Turret on ammo...
Founder of Jadelight Studio, Developer of Libertas Aedifex, regular C2 Help contributor and fan of ambient music and Star Wars.
B
12
S
4
Posts: 255
Reputation: 2,008

Post » Mon Sep 15, 2014 10:34 am

You can try this:

Enemy on screen
---- bullet set position to enemy and use lerp to make smooth moving
------ Else bullet set position to outside layout and also use lerp.
B
60
S
10
G
10
Posts: 1,013
Reputation: 9,155

Post » Mon Sep 22, 2014 2:29 pm

thanks for your reply I've made investigation about lerp, but I don't understand how and where to use this fonction.

could you help me, sorry to ask you again for help.
B
3
Posts: 8
Reputation: 189


Return to How do I....?

Who is online

Users browsing this forum: tarek2 and 9 guests