Page 1 of 1

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

PostPosted: Sat Sep 13, 2014 12:03 pm
by ngmusic
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

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

PostPosted: Sat Sep 13, 2014 11:24 pm
by yonda
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

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

PostPosted: Mon Sep 15, 2014 7:13 am
by ngmusic
Thanks for your help, I'll try that and let you know.

all the best

NG

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

PostPosted: Mon Sep 15, 2014 10:08 am
by inquiesco
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...

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

PostPosted: Mon Sep 15, 2014 10:34 am
by A0Nasser
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.

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

PostPosted: Mon Sep 22, 2014 2:29 pm
by ngmusic
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.