User Tag List

Results 1 to 7 of 7

Thread: New strange things... Collisions

  1. #1
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module
    Tuna's Avatar
    Join Date
    Feb 2008
    Location
    Central Texas
    Posts
    1,853
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    New strange things... Collisions

    Background:
    I have 1 collision event that tests when the blaster hits group.enemies. On the event, the blaster is destroyed and 1 hit point is deducted from the Group.Enemies object that got hit.

    If the Group.Enemies object is reduced to 0 hit points, said enemy blows up (fast loop is called) and a star appears (power-up style).

    There are usually about 15 or so enemies on the screen at any given time.

    PROBLEM:
    every now and then when only 1 enemy gets hit, ALL the Group.Enemies vanish and 1 star power up appears in place of each.

    This is VERY frustrating because it totally ruins the game play.

    I thought perhaps it had something to do with the Qualifiers, (an error therein). So i re-wrote it without using Qualifiers and I still get the same problem.

    Has anyone seen this type of glitch, where MMF2 seems to get confused on collisions?

  2. #2
    Clicker Multimedia Fusion 2SWF Export Module

    Join Date
    Sep 2006
    Posts
    1,544
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Re: New strange things... Collisions

    It very likely has something to do with how your code is formatted and in what order the events occur. These sorts of problems are almost always caused by an issue with the way objects are "scoped" by the object scope list, which controls which objects actions will apply to.


    Which is impossible to know without seeing your code

  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module
    Tuna's Avatar
    Join Date
    Feb 2008
    Location
    Central Texas
    Posts
    1,853
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Re: New strange things... Collisions

    I had a feeling that would be the response. It's impossible to diagnose anything without seeing code.

    I'm so old school that I really don't like to let everyone see my code. I'll keep toying with it, if I can't find the problem, I'll bite the bullet and post the code.

    Thanks!


  4. #4
    Clicker Multimedia Fusion 2SWF Export Module

    Join Date
    Sep 2006
    Posts
    1,544
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Re: New strange things... Collisions

    The best advise I can give is to study the order of the "Object Scope List" and understand how it works, because that is likely what is causing your problem.

    The object scope list tells MMF which objects to apply a given event (and further conditions) to, and is determined by conditions. If all your objects are being destroyed and replaced, it means all your objects are being scoped somehow.



    A very likely way this can occur is that you have actions that take place after a call to a fast loop inside an event. MMF does not preserve the object scope list on its stack frames (it really should!), and so any actions that take place after a fast loop call will take place on an empty object scope list- and generally apply to everything.



    For example, if you have code that looks like this:


    +On Collision Between A & B:
    = Start Loop "LoopName"
    = Destroy A


    the call to "start loop" would reset the object scope list- making it no longer scope the colliding objects only, and start scoping all objects again- this would cause all objects to be destroyed.

  5. #5
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module
    Tuna's Avatar
    Join Date
    Feb 2008
    Location
    Central Texas
    Posts
    1,853
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Re: New strange things... Collisions

    Yes, I learned a long time ago that once you call a fast loop, things don't work well if called after the fast loop. I always call fast loops last.

    This is still very useful information, and I'll continue to try and solve this issue.

  6. #6
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module
    Tuna's Avatar
    Join Date
    Feb 2008
    Location
    Central Texas
    Posts
    1,853
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Re: New strange things... Collisions

    Ok, I solved the problem by:

    Setting a global variable to hold the Fixed Value of the Group.Enemies active that was hit.

    SO, while testing IF Group.Enemies.HitPoints <=0 I'm also testing to ensure the Fixed Value of said group.enemies active is the same as the stored value.

    No more errant exploding enemies! I really should have thought of this before.

  7. #7
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module
    Tuna's Avatar
    Join Date
    Feb 2008
    Location
    Central Texas
    Posts
    1,853
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Re: New strange things... Collisions

    It's coming along nicely...

    I can't seem to get much more done because I play for hours, then make a 2 minute code change, then play again for hours!


Similar Threads

  1. need advice on a few things
    By CoxyofNewp in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 23rd October 2011, 01:00 AM
  2. [HELP] Strange things in this 3 layers platforming
    By BackStaged in forum File Archive
    Replies: 1
    Last Post: 2nd October 2010, 08:38 AM
  3. Strange Things Happening
    By Tuna in forum Hardware Accelerated Runtime
    Replies: 6
    Last Post: 19th May 2010, 10:28 PM
  4. Ok, say you have 3 things:
    By Aloan in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 12th July 2009, 01:32 PM
  5. A couple of things with ICP
    By MadHatter in forum Install Creator and Patch Maker
    Replies: 3
    Last Post: 26th August 2008, 02:02 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
  •