User Tag List

Results 1 to 6 of 6

Thread: Bad guys detector problem

  1. #1
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCHTML5 Export ModuleiOS Export ModuleSWF Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    chrilley's Avatar
    Join Date
    Jul 2006
    Posts
    962
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)

    Bad guys detector problem

    Defect bad guy movement. Please help me find out why the detectors won't work properly.[cry]
    Attached files Attached files

  2. #2
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCHTML5 Export ModuleiOS Export ModuleSWF Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    chrilley's Avatar
    Join Date
    Jul 2006
    Posts
    962
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)

    Re: Bad guys detector problem

    I made a MMF 1.5 version if there's someone who doesn't have MMF2 standard.
    Attached files Attached files

  3. #3
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Jun 2006
    Location
    Darlington, UK
    Posts
    3,298
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Bad guys detector problem

    You are using "compare 2 general values" instead of "compare to alt value of object".

    This means that mmf only tests the first object, even though you are doing a loop. If you use the compare to alt value condition of the object itself then mmf will look at all the objects to see which one matches the loop index, instead of only the first.

    EDIT: This is my best explanation:
    You have 1 "special object" (internal mmf object that has the compare 2 general values condition in), which I will show as an X, and some enemies (Y) and detectors (Z):
    X
    YYYYYY
    ZZZZZZ
    Now, as mmf can only select objects of the type the condition is in, when you use "compare two general values" in the special object it can only pick one object, and that's the special object. It automatically chooses the first of the others when it's asked to retrieve the alt value, but it won't test them all because it only has one "special object" to test:
    (Blue is tested, Red are chosen automatically because of the expression, grey not tested)
    [color:#0000FF]X[/color]
    [color:#FF0000]Z[/color][color:#808080]ZZZZZ[/color]
    If you use the compare to alt value condition in the detector then it checks all the detectors against the value:
    (blue are tested, green passes the test)
    [color:#0000FF]ZZZ[/color][color:#00AA00]Z[/color][color:#0000FF]ZZ[/color]
    Then when you test for a matching enemy, if you use "compare to alt value of enemy":
    (blue are tested, green passes, red chosen by the expression in the condition, grey failed last condition):
    [color:#0000FF]YYY[/color][color:#00AA00]Y[/color][color:#0000FF]YY[/color]
    [color:#808080]ZZZ[/color][color:#FF0000]Z[/color][color:#808080]ZZ[/color]
    Because there was only one "Z" that passed the last condition it chooses that one automatically for every Y that it is testing.
    Attached files Attached files

  4. #4
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCHTML5 Export ModuleiOS Export ModuleSWF Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    chrilley's Avatar
    Join Date
    Jul 2006
    Posts
    962
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)

    Re: Bad guys detector problem

    I kinda understand what you're saying. And it almost works as it should. But for some reason they cannot move at the same time. Only one bad guy can move at one time now. It seems that the fast loop sticks to one object until it hits the wall and then goes to the next one...

    [edit: I solved that issue by modifying the
    Alterable Value A = LoopIndex("overlap check") condition to this: Alterable Value A = LoopIndex("overlap check") + random(NObjects("Detector") - random(NObjects)

    So far it hasn't been a problem but do you believe this is a good or bad solution?

  5. #5
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Jun 2006
    Location
    Darlington, UK
    Posts
    3,298
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Bad guys detector problem

    For me now one object moves and stops and then nothing more happens.

    If you remove the "only one action when event loops" it works right.

  6. #6
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCHTML5 Export ModuleiOS Export ModuleSWF Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    chrilley's Avatar
    Join Date
    Jul 2006
    Posts
    962
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)

    Re: Bad guys detector problem

    True, this seems much better. It seems to work very well now. Thanks for helping me out!

Similar Threads

  1. Embedded detector in animation... problem!
    By Konidias in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 9th March 2013, 04:44 AM
  2. Hey guys, help me out? :)
    By DistantJ in forum iOS Export Module Version 2.0
    Replies: 13
    Last Post: 9th November 2012, 12:37 AM
  3. Strange problem in add solid with detector
    By MEHRDAD in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 13th February 2012, 03:10 PM
  4. Hi guys. How far from A to B?
    By AerosolSP in forum Multimedia Fusion 2 - Technical Support
    Replies: 7
    Last Post: 15th January 2007, 12:41 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
  •