User Tag List

Results 1 to 5 of 5

Thread: Object Focus: multiple overlapping collisions

  1. #1
    No Products Registered

    Join Date
    Jan 2007
    Location
    Florida
    Posts
    25
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Object Focus: multiple overlapping collisions

    Hey, I have a problem involving TGF2's handling of Object Focus.
    I've already read up on MMF2's Object Focus and how it works.

    I've got an event that occurs when my [color:#FF6666]Player[/color] object is overlapping a certain [color:#3366FF]Active[/color] object, and I want the event to occur once for every [color:#3366FF]Active[/color] object that the [color:#FF6666]Player[/color] is currently overlapping. Right now the event only runs once no matter how many instances of the [color:#3366FF]Active[/color] object the [color:#FF6666]Player[/color] is actually overlapping - and ONLY for the first overlapped [color:#3366FF]Active[/color].

    So I want to test and run the event for each specific [color:#3366FF]Active[/color] that the [color:#FF6666]player[/color] is overlapping. It needs to be specific to the [color:#3366FF]Active[/color], too - I need to use the specific values attached to each [color:#3366FF]Active[/color] separately for other events.

    I don't want to use an indexed fastloop because it might get expensive on the PC later on.

    Is there another way to do it? Maybe??

    If using a fastloop is the best way (or only way), then I'll probably still use it. But, I'm hoping there's a better way.

    Oh, and I can load an example.mfa if it'll help me get some answers.

  2. #2
    Forum Moderator Fusion 2.5 DeveloperHTML5 Export ModuleiOS Export ModuleSWF Export Module
    DavidN's Avatar
    Join Date
    Jun 2006
    Location
    Boston, MA, USA
    Posts
    4,044
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Object Focus: multiple overlapping collisions

    What a colourful post.

    I was having problems with this earlier, too - I think that using an indexed fastloop is probably the best way, to see if the fixed value (or, more likely, a value that you've previously spread) of the Active is equal to that of the loop index before running the actions. This shouldn't chew up too much of the computer unless you're using heaps of actives - how many are you anticipating having to have in the frame at any time?

    Failing that, you could always swap (Player overlaps Active) with (Active overlaps Player). That sometimes helps, but if you've read about object focus you've most likely tried that already.

  3. #3
    No Products Registered

    Join Date
    Jan 2007
    Location
    Florida
    Posts
    25
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Object Focus: multiple overlapping collisions

    Hmm. Yeah.

    Oh! Yeah... Duh! You're right, I can just check the ones that are on-screen. I won't have an enormous amount of the [color:#3366FF]Active [/color]objects on the screen at any one time. They'll probably float around 20-80 depending on the [color:#FF6666]player[/color]'s position. I was hesitant to use a loop because the number of [color:#3366FF]Actives[/color] in the whole frame will probably be ten times that number for an average size "level" - or more.

    So what if I use "Inactive if too far from window"? I mean, when this is checked on, exactly how far from the window is too far? The TGF2 docs aren't really clear about it.

    To weed the off-screen [color:#3366FF]Actives[/color] out of the bunch, would it be best to use this option or add to the loop some kind of process of identifying the ones that are on screen and off?

    Thanks for the reply, too.

  4. #4
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export Module
    Francois's Avatar
    Join Date
    Jul 2006
    Location
    Montpellier, France
    Posts
    6,920
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)

    Re: Object Focus: multiple overlapping collisions

    But the Is overlapping condition should select all the objects overlapping your player object! If it does not, this is a bug. Can you send me an example file showing how it does not work?

  5. #5
    No Products Registered

    Join Date
    Jan 2007
    Location
    Florida
    Posts
    25
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Object Focus: multiple overlapping collisions

    Weird. I made an example to upload, and decided to throw the fastloop solution in to it too, but I can't get the fastloop to detect more than one collision either! Now I know I must be doing something wrong.

    Here's the link:
    http://www.sharebigfile.com/file/111520/OFCollisions-mfa.html

    I just googled for the host. Dunno if there's more popular ones. To download, enter the code at the bottom and then it will make you wait 30 seconds (for some reason) and then you can download it.

    I'm still mainly interested in the regular collision detection question, but if someone can tell me why the loop isn't solving it either, that would be helpful.

    Thanks.

Similar Threads

  1. Multiple duplicate objects overlapping, not individually responding to Qualifiers.
    By ratty in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 5th July 2012, 09:20 PM
  2. Multiple objects overlapping an obstacle
    By gkinfinity in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 9th August 2011, 05:10 AM
  3. Objects not responding to collisions/overlapping
    By CloudJDR in forum Multimedia Fusion 2 - Technical Support
    Replies: 8
    Last Post: 29th July 2010, 09:23 PM
  4. Collisions object
    By Roseweave in forum Extension Development
    Replies: 14
    Last Post: 17th June 2008, 04:32 PM
  5. Replies: 17
    Last Post: 14th February 2008, 02:16 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
  •