User Tag List

Results 1 to 6 of 6

Thread: Last object has been destroyed with a flag on

  1. #1
    Clicker Multimedia Fusion 2Android Export Module
    Corlen's Avatar
    Join Date
    Mar 2007
    Location
    Your House
    Posts
    848
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Last object has been destroyed with a flag on

    Simple concept. How do I check if the last object has been destroyed that had a flag on?

  2. #2
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    mobichan's Avatar
    Join Date
    Oct 2007
    Location
    Buffalo, NY
    Posts
    3,310
    Mentioned
    28 Post(s)
    Tagged
    0 Thread(s)

    Re: Last object has been destroyed with a flag on

    When that object type is destroyed, you could use a fastloop or the ForEach object to check each copy of that object to see if it has that flag turned on. If it does, then increment a counter or variable. Then after the loop is done, check that the counter or variable equals zero.

  3. #3
    Clicker Multimedia Fusion 2Android Export Module
    Corlen's Avatar
    Join Date
    Mar 2007
    Location
    Your House
    Posts
    848
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Last object has been destroyed with a flag on

    Thanks, that seems to work reliably so far. Hopefully it isn't unreliable in future play tests.

  4. #4
    Forum Moderator

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export ModuleInstall Creator Pro
    nivram's Avatar
    Join Date
    Jul 2006
    Location
    Bandon, Oregon
    Posts
    6,773
    Mentioned
    12 Post(s)
    Tagged
    0 Thread(s)

    Re: Last object has been destroyed with a flag on

    That is brilliant Reg.

    Marv
    ​458 TGF to CTF 2.5+ Examples and games
    http://www.castles-of-britain.com/mmf2examples.htm

  5. #5
    Clicker Multimedia Fusion 2Android Export Module
    Corlen's Avatar
    Join Date
    Mar 2007
    Location
    Your House
    Posts
    848
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Last object has been destroyed with a flag on

    Just an update, I had the fastloop in the ForEach object that adds to the variable start when the player attacks an enemy and I used it to determine if multiple enemies are caught up in the attack and then as they are destroyed, I subtract from the variable and when the variable equals 0, the attack finishes. I needed this so I could make the attack only finish if all the enemies caught up in it are destroyed. If no enemies are caught up in it, it just finished on its own after a short period of time. It seems to be working very reliably after about several dozen play tests, thanks mobichan.

  6. #6
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    mobichan's Avatar
    Join Date
    Oct 2007
    Location
    Buffalo, NY
    Posts
    3,310
    Mentioned
    28 Post(s)
    Tagged
    0 Thread(s)

    Re: Last object has been destroyed with a flag on

    No prob. Glad it worked out. ^_^

Similar Threads

  1. Destroyed object reapears!
    By AftPeakTank in forum Multimedia Fusion 2 - Technical Support
    Replies: 7
    Last Post: 24th June 2013, 09:11 AM
  2. [BUG] Create object if flag is off, and assign something to the created object
    By Popcorn in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 24th January 2013, 11:01 PM
  3. object not completely destroyed?
    By pikzilla in forum Multimedia Fusion 2 - Technical Support
    Replies: 8
    Last Post: 30th June 2010, 04:23 PM
  4. Object destroyed if not on frame
    By pikzilla in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 12th April 2010, 03:26 AM
  5. How can a destroyed object be visible?
    By RayMarble in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 20th October 2008, 06:57 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
  •