User Tag List

Results 1 to 6 of 6

Thread: Number of Tagerts Problem

  1. #1
    No Products Registered

    Join Date
    Jul 2009
    Posts
    40
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Number of Tagerts Problem

    Hello there!
    I am still working on my top-down shoter and i have a little but very important issue.
    I have enemies on batlefield and turets. Each one turret has "detector"(solid circle active object)that allows them(turrets)detect enemies. More than that i would like every detector to "calcualte" how many tagerts are detected by it.
    I tried do that using flags but it does not works.
    Help me please!

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    UltimateWalrus's Avatar
    Join Date
    Jul 2006
    Posts
    824
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Number of Tagerts Problem

    Always
    -->Set TargetCount of TurretArea to 0

    Always
    -->Spread value 0 in ID of Target

    Always
    -->Start fastloop "targets" NObjects("Target") times

    On loop "targets"
    +ID of Target = loopindex("targets")
    +TurretArea is overlapping Target
    -->Add 1 to TargetCount of TurretArea



    Does that make sense? Let me know if you still need help.

  3. #3
    No Products Registered

    Join Date
    Jul 2009
    Posts
    40
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Number of Tagerts Problem

    Ok! But why it is neccessary to use fast-loop?! And why the
    following code does not work(using your value names to be clear):
    Always
    -->Set TargetCount of TurretArea to 0

    Target is overlapping TurretArea
    -->Add 1 to TargetCount of TurretArea
    ?

  4. #4
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    UltimateWalrus's Avatar
    Join Date
    Jul 2006
    Posts
    824
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Number of Tagerts Problem

    Quote Originally Posted by RealGameMaker
    Ok! But why it is neccessary to use fast-loop?! And why the
    following code does not work(using your value names to be clear):
    Always
    -->Set TargetCount of TurretArea to 0

    Target is overlapping TurretArea
    -->Add 1 to TargetCount of TurretArea
    ?

    That event makes perfect sense to a human being... but when you code events, you basically need to put them in a form that Multimedia Fusion can understand.

    In an MMF program cycle, each event will execute only once (excluding fastloops). So, when the program hits your event, it'll see if any target is overlapping a TurretArea, and if it is, it'll add 1 to TargetCount of TurretArea... once. (regardless of how many targets are actually overlapping).

    The point of the fastloop is to add 1 to TargetCount for every target that is overlapping the TurretArea... does that make sense?

  5. #5
    No Products Registered

    Join Date
    Jul 2009
    Posts
    40
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Number of Tagerts Problem

    Yes! Thanks!
    But where can i find description of MMF2 code logics?(books, articles...)

  6. #6
    Forum Moderator

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export ModuleInstall Creator Pro
    nivram's Avatar
    Join Date
    Jul 2006
    Location
    Bandon, Oregon
    Posts
    6,773
    Mentioned
    12 Post(s)
    Tagged
    0 Thread(s)

    Re: Number of Tagerts Problem

    MMF2 Runtime Engine
    http://www.clickteam.com/website/usa/tutorials

    Marv
    ​458 TGF to CTF 2.5+ Examples and games
    http://www.castles-of-britain.com/mmf2examples.htm

Similar Threads

  1. Big problem with max number group of MMF2 Develope
    By daniele in forum Multimedia Fusion 2 - Technical Support
    Replies: 10
    Last Post: 5th September 2010, 10:55 PM
  2. URGENT Serious problem in MMF2 number 3
    By JumpplatmanYGO in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 4th May 2010, 01:44 PM
  3. Random number problem
    By Bk90 in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 29th December 2009, 12:19 AM
  4. Problem writing value to number array > returns 0
    By Tiny in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 22nd September 2006, 03:59 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
  •