User Tag List

Results 1 to 4 of 4

Thread: Need Advice on multiple turrets shooting units

  1. #1
    No Products Registered

    Join Date
    Sep 2006
    Location
    Germany
    Posts
    861
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Need Advice on multiple turrets shooting units

    Im fairly behind on all that "action stuff" in MMF2, spend lot's of time on strategy and RPG, so I need some advice on how to do that.

    So in my game at runtime you can place multiple turrets of different kinds.

    Take this as an example (thats not my game just a screenshot)


    There are two ways I know of I would prefer the first one, but the second one will do as well.

    First method.

    Every Second each of those turrets calculate the distance to all enemy targets. All targets are IDed and I want each turret to store the one ID that is closed (compared in distance) to him. How do i pick the object that is closest to a turret?

    Second method.

    Each turret has a "Range" Detector overlay, an active actually and I check for overlapping. Once overlapping I want only that one turret to shoot at the enemy. If there are more then two overlapping a random pick would be ok or the first one gets shot until dead.

    Any ideas, maybe other ideas as well?

    I had an old example for the value finder extension. Unfortunatly it's not 2.0 compatible

  2. #2
    No Products Registered

    Join Date
    Sep 2006
    Location
    Germany
    Posts
    861
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Need Advice on multiple turrets shooting units

    I uploaded an example:

    http://www.fromheaven.de/Turrets.mfa

    I run a loop for each turret which starts a second loop for each enemy. On the second loop it checks the distance and writes it to the turrets alt value. I made a second condition which checks if that distance is actually the lowest one and if that is true write it into another alt value. However that part is not working. Any help appreciated

  3. #3
    No Products Registered

    Join Date
    Dec 2006
    Posts
    1,332
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Need Advice on multiple turrets shooting units

    I think this will help a little. Its an example I posted a while ago on how to make multiple turrets shoot different targets depending on the closest one.

    http://www.clickteam.com/epicenter/ubbthreads.php?ubb=showflat&Main=6951&Number=46515 #Post46515

  4. #4
    No Products Registered

    Join Date
    Sep 2006
    Location
    Germany
    Posts
    861
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Need Advice on multiple turrets shooting units

    Thanks Brandon, I will give it a try.

Similar Threads

  1. large ship with lots of turrets question
    By mobichan in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 28th November 2008, 03:18 PM
  2. Replies: 17
    Last Post: 14th February 2008, 02:16 PM
  3. Multiple Turret Shooting With Multiple Targets
    By Brandon in forum File Archive
    Replies: 4
    Last Post: 29th January 2008, 02:34 AM
  4. Mounting Turrets to Multiple Ships
    By SergeantBiscuits in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 25th June 2007, 02:19 PM
  5. Problems with multiple objects shooting
    By krick in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 1st August 2006, 03:37 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •