The Daily Click ::. Forums ::. Klik Coding Help ::. Following diffrent targets
 

Post Reply  Post Oekaki 
 

Posted By Message

LordHannu

Crazy?

Registered
  22/04/2007
Points
  7909

VIP MemberStarTeddy BearRibbonGame of the Week Winner2021 Halloween Competition Winner2022 Hi-Score Mash-up Competition (Bronze)2023 Halloween Competition (Bronze)2023 Halloween Competition Entrant
12th May, 2014 at 12/05/2014 17:49:40 -

Im trying to make Torpidoes that follows a target.
so if i fire several torpidoes i want them to each follow diffrent target.
Any Ideas how to make that?
Atm i have when enemy and torpido is visable it looks at a target and follows it but when it comes a new enemy it makes a new terget to follow. :S so the torpido flies berserk.

 
n/a

s-m-r

Slow-Motion Riot

Registered
  04/06/2006
Points
  1078

Candle
12th May, 2014 at 12/05/2014 20:30:38 -

I wonder if there's a way to do this:
- create two objects when the user clicks on an enemy: Target and Torpedo
- each of those objects takes on the same Spread Value whenever they're created
- make the Torpedo always turn to face the Target that matches its Spread Value
- when the Torpedo overlaps the matching Target, destroy both the Target and the Torpedo, and then affect the enemy the Target was overlapping (cause damage, destroy, etc.)

I'm a fan of using Flags, and then setting up an event to see if a flag hasn't been tripped. If the Flag isn't tripped, cause a certain effect to happen to that object, then at the end of the effects trip the Flag to On. This ensures the effect won't happen to the same object more than once.

Good luck with your torpedoes, man!

 
n/a

LordHannu

Crazy?

Registered
  22/04/2007
Points
  7909

VIP MemberStarTeddy BearRibbonGame of the Week Winner2021 Halloween Competition Winner2022 Hi-Score Mash-up Competition (Bronze)2023 Halloween Competition (Bronze)2023 Halloween Competition Entrant
12th May, 2014 at 12/05/2014 20:38:03 -

Thanks for the hint i was thinking the same, but i found a way. I used Advanced Diraction Object. So now the topidoes goes towards the closet enemy and searches for another one directly after the target is gone, works great!

Thanks to: http://www.castles-of-britain.com/mmf2examples.htm

 
n/a
   

Post Reply



 



Advertisement

Worth A Click