User Tag List

Results 1 to 6 of 6

Thread: Testing for nearby actives without sensors?

  1. #1
    Clicker Fusion 2.5 DeveloperiOS Export ModuleSWF Export Module

    Join Date
    Mar 2008
    Location
    Singapore, Singapore
    Posts
    281
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Testing for nearby actives without sensors?

    For my main character I test the location of other actives using sensor actives placed around my character.

    My predicament is that I have multiple enemies whom I need to test for collision and other stuff. How do I test positions of other objects without having to use sensors on my enemies?

    Is there a sort of event sequence that I can use to determine if an active is within a certain number of pixels of another active?

    Thanks
    Oreo

  2. #2
    Clicker Fusion 2.5 Developer

    Join Date
    Jul 2008
    Location
    UK
    Posts
    1,393
    Mentioned
    16 Post(s)
    Tagged
    0 Thread(s)
    You have three main options that I can think of:

    1.) Use detector objects as normal - either use one for each object, or run a fastloop/foreach loop to "share" a detector.
    This tends to be awkward to implement and/or inefficient, so I don't recommend it.

    2.) Use maths - eg. pythagoras' theorum: Distance = Sqrt(((X("A") - X("B")) pow 2) + ((Y("A") - Y("B")) pow 2))
    This is fairly simple and very efficient (esp. with very large objects), but obviously you don't get pixel-perfect collision detection.

    3.) Use embedded detectors - http://www.create-games.com/article.asp?id=1639
    This is fairly simple and efficient, and it gives you pixel-perfect collision detection, so its my preferred method in most cases.

  3. #3
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    King_Cool's Avatar
    Join Date
    Aug 2008
    Posts
    2,335
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Use the AdvanceDirection extencion

  4. #4
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCSWF Export Module
    N64Mario's Avatar
    Join Date
    Nov 2008
    Location
    USA
    Posts
    1,308
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)
    Hmm...... I have a closest enemy example (Don't remember who made it). Do you think that will help? It basically supposed to find the closest enemy using distances & stuff.
    Attached files Attached files

  5. #5
    Clicker Multimedia Fusion 2
    MangoMan's Avatar
    Join Date
    Oct 2011
    Posts
    31
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hm, how can I get the Advanced Direction extension (or whatever it's called)? I'd like to get it because it won't let me view N64Mario's example without it.

  6. #6
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Jan 2010
    Posts
    164
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The Advanced Direction Object is in the Extensions pack 1

    http://www.clickteam.com/webftp/files/mmf2/Exts/MMF2ExtPack1.exe

    Other than that, I recommend downloading a program called extension view, made so that you can search for (and download) any extension out there Here is the link for that: http://www.clickteam.com/epicenter/ubbthreads.php?ubb=showflat&Number=245084#Post2450 84

Similar Threads

  1. Problem with Sensors.
    By NickLane in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 30th July 2011, 04:00 PM
  2. Multiple enemy's with sensors.
    By Jase in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 4th September 2010, 12:26 AM
  3. Individual sensors for enemies?
    By Oreo in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 17th February 2009, 01:16 AM

Posting Permissions

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