The Daily Click ::. Forums ::. Klik Coding Help ::. Multiple Guns and Targets
 

Post Reply  Post Oekaki 
 

Posted By Message

Jonny



Registered
  01/11/2006
Points
  29
2nd January, 2007 at 01:51:53 -

I have several different guns and several different enemies. I’m using the Angle Calculator extension (even though I’ve tried the Advanced Direction object and the same thing happens) to find the distance between the gun and the enemy. If the distance between the gun and the enemy is less than 100, then the gun always looks in the direction of the enemy and shoots, and when the enemy is greater than 100 pixels away the gun stops shooting.

My problem is that MMF only recognizes one of the enemies and one of the guns; one specific enemy has to be within the defined distance of one specific gun for it all to work. The strange part is that it aims at the right enemy, but screws up when I try to use fast loops. I’ve tried every thing I could possibly think of, but only wound up extremely pissed off. Boothman had a similar problem, but he had only one thing to shoot at, were I have any possible number of things to shoot at and any possible number of guns that are shooting.


 
n/a

axel

Crazy?

Registered
  05/02/2005
Points
  4766

Game of the Week WinnerYou've Been Circy'd!
2nd January, 2007 at 18:41:56 -

I've been trying to do the same thing too, but it won't work. I tried spread a value and fastloops, but MMF's logic seems to be completely fucked up.

 
n/a

Radix

hot for teacher

Registered
  01/10/2003
Points
  3139

Has Donated, Thank You!VIP MemberGOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!GOTW WINNER CUP 4!
3rd January, 2007 at 06:13:40 -

The solution is spread values and fastloops. I don't have an example handy but I remember seeing a 'multiple turrets demo' or something not too long ago. I'd search for it but time is sleep.

 
n/a

Jonny



Registered
  01/11/2006
Points
  29
3rd January, 2007 at 15:52:23 -

I did a search on a 'RTS Object' and found one made by Tigerworks. It solves my problem completely! Axel, you said you had the same problem, so check the RTS object out.

 
n/a

axel

Crazy?

Registered
  05/02/2005
Points
  4766

Game of the Week WinnerYou've Been Circy'd!
3rd January, 2007 at 16:14:06 -

I've got the RTS object, but I really don't see how it would solve any problems. The thing is I never really figured out how to use it properly. I thought it only did stuff like getting the distance between two points or something. An example file would be nice.

Image Edited by the Author.

 
n/a

Jonny



Registered
  01/11/2006
Points
  29
3rd January, 2007 at 18:40:41 -

www.freewebs.com/jonnymataza/multipleturrets.cca

Hope this helps.

 
n/a
   

Post Reply



 



Advertisement

Worth A Click