User Tag List

Results 1 to 9 of 9

Thread: Weird problem with MMF2

  1. #1
    No Products Registered

    Join Date
    Feb 2008
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Weird problem with MMF2

    Hi guys,
    I have a big problem and I don't understand how is it possible to happen!

    I'm trying to code the AI for the enemies of my game and I noticed this problem.

    writing the following code...
    + Collision between Player and Enemy
    + Enemy ID = 1
    = Then sub 1 to Player's HP

    isnt' the same thing as writing the following?
    + Enemy ID = 1
    + Collision between Player and Enemy
    = Then sub 1 to Player's HP

    I mean... I always tought tha switching the condition's order does not change a thing. Am I wrong?
    Because in the first example, nothing happens... while with the second example the PLayer's HP are correctly decreased.

    So what could be the problem? Maybe a bug?
    Somebody did experienced the same problem?

    Thank you in advance!

  2. #2
    Forum Moderator Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module
    Stephen's Avatar
    Join Date
    Aug 2008
    Location
    Montana
    Posts
    4,515
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: Weird problem with MMF2

    I do know that MMF2 is sometimes picky about the order of events.

    stephen1980
    _____________________________________________
    Nivram's Examples -Need extensions? Send me a PM.-


  3. #3
    No Products Registered

    Join Date
    Feb 2009
    Location
    Texas
    Posts
    825
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Weird problem with MMF2

    Alpha, i THINK that if the condition in red is first, then when it happens, it wont have time to see if the Enemy ID = 1, so nothing happens

  4. #4
    No Products Registered

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

    Re: Weird problem with MMF2

    "Collision between Player and Enemy" is colored in RED and has to be in front of all the other events or it will NOT work.

  5. #5
    Forum Moderator Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module
    Stephen's Avatar
    Join Date
    Aug 2008
    Location
    Montana
    Posts
    4,515
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: Weird problem with MMF2

    Quote Originally Posted by maVado
    "Collision between Player and Enemy" is colored in RED and has to be in front of all the other events or it will NOT work.
    I think this is opposite in his code that works?

    stephen1980
    _____________________________________________
    Nivram's Examples -Need extensions? Send me a PM.-


  6. #6
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleSWF Export ModuleUnicode Add-on
    Looki's Avatar
    Join Date
    Aug 2006
    Location
    Karlsruhe, Germany
    Posts
    3,741
    Mentioned
    5 Post(s)
    Tagged
    1 Thread(s)

    Re: Weird problem with MMF2

    Red events are triggered, they do not use an equation to return true or false (unlike "Compare global value" etc.)... if they're red at the top, leave them there. You can't combine multiple trigger conditions.

  7. #7
    No Products Registered

    Join Date
    Feb 2008
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Weird problem with MMF2

    First of all, thank you guys for all the answers.

    I knew that collision conditions should be put on the top, but this time it only works if I don't put it on the top.
    I don't understand why.

    I mean... even if it was the other way around, putting it on the top would only run the game smoother, but it won't change completely the result of the code line.

    What I don't understand is why if I switch the conditions order I don't get the same result from my code line.
    The order of actions is important but the order of conditions is not as much important.

    Am I wrong?
    Could it be a bug?

  8. #8
    Forum Moderator Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module
    Stephen's Avatar
    Join Date
    Aug 2008
    Location
    Montana
    Posts
    4,515
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: Weird problem with MMF2

    It could be something you are trying to do in your app/game. Maybe upload an .mfa we could look at to determine the problem?

    stephen1980
    _____________________________________________
    Nivram's Examples -Need extensions? Send me a PM.-


  9. #9
    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: Weird problem with MMF2

    MMF goes through the conditions from the top down selecting objects to act on as it goes, so the order of conditions in an event can make a difference in certain cases. It's a bit difficult to describe the nuances of all of the conditions, though, and your example at the top definitely seems to go against what I would have thought would work at first glance.

Similar Threads

  1. Weird FPS problem.
    By blub in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 2nd July 2012, 11:02 PM
  2. Weird problem with surface.
    By NeoMonkey in forum File Archive
    Replies: 4
    Last Post: 10th March 2011, 04:54 PM
  3. Weird X-axis problem
    By Cossin in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 23rd July 2010, 07:30 AM
  4. Weird problem! Please Help!
    By csj1 in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 21st July 2008, 02:28 AM
  5. Weird loop problem
    By Nick in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 19th May 2008, 11:35 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
  •