User Tag List

Results 1 to 7 of 7

Thread: How to delete single instance of an object

  1. #1
    Clicker Multimedia Fusion 2 DeveloperiOS Export Module
    liquiddil's Avatar
    Join Date
    Mar 2013
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to delete single instance of an object

    This might be in the wrong spot and if so i am sorry.

    I am having an issue where i have an enemy object and a detector object, i take these two objects and copy/paste them to make several instances of the same enemy/detector.

    The issue is when the collision happens, the correct enemy object is destroyed but instead of destroying the detector attached to the enemy, it destroys them all. This causes the remaining enemy objects to become frozen as they have no detector to help them move about that game area.

    The destroy command is on one single line, which destroys both the enemy and detector. Any help is greatly appreciated.

    -Liquid

  2. #2
    Clicker Fusion 2.5 DeveloperiOS Export ModuleSWF Export Module
    Pineapple's Avatar
    Join Date
    Oct 2010
    Posts
    431
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Spread values might help with this.
    Spread or assign a value to both the enemy and detector, and when the enemy is destroyed, destroy the detector too.

    It would be something like:
    Bullet hits enemy: set enemy's flag 1 on
    Enemy's flag 1 is on & detector's Alterable value A = enemy's Alterable value A: destroy detector
    Enemy's flag 1 is on: destroy enemy

    Dealing with multiple instances can be a bit tricky, and will probably take some trial and error to get this kind of thing working.

  3. #3
    Clicker Multimedia Fusion 2 DeveloperiOS Export Module
    liquiddil's Avatar
    Join Date
    Mar 2013
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you for the response. I could be wrong, but what you wrote doesn't make sense to me.

    you wrote:

    It would be something like:
    Bullet hits enemy: set enemy's flag 1 on so the enemy flag is now 1
    Enemy's flag 1 is on & detector's Alterable value A = enemy's Alterable value A: destroy detector at this point how would either Alterable value have an actual value, is this something set earlier or is this where the spread comes into play?
    Enemy's flag 1 is on: destroy enemy

  4. #4
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCSWF Export Module
    Alonso's Avatar
    Join Date
    Jul 2006
    Posts
    681
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This is completely unintuitive, but it works wonders:

    If you're using always -> position detector x,y to enemy x,y to locate the detectors on the appropriate enemy, then just add this to that event:

    * Always -> set value X of detector to value X of enemy.

    When you want to destroy the enemy, set its value X to 1. This will make MMF set only its corresponding detector's value X to 1. Then:

    *Value X of detector = 1 -> destroy detector
    *Value X of enemy = 1 -> destroy enemy

    MMF's object selection is very odd but, for cases like this, it's very handy.

  5. #5
    Clicker Multimedia Fusion 2 DeveloperiOS Export Module
    liquiddil's Avatar
    Join Date
    Mar 2013
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the suggestion but i get the same results with both of these examples, except now all the enemies destroy instead of just the one. We seem to be going backwards on this. Any other suggestions?

  6. #6
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCSWF Export Module
    Alonso's Avatar
    Join Date
    Jul 2006
    Posts
    681
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You probably just didn't do it right. Here's an example, it's surprisingly simple.
    Attached files Attached files

  7. #7
    Clicker Multimedia Fusion 2 DeveloperiOS Export Module
    liquiddil's Avatar
    Join Date
    Mar 2013
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Alonso, you are the best your example was very helpful and i got it working, thank you!

Similar Threads

  1. How to delete a single file
    By billv in forum Multimedia Fusion 2 - Technical Support
    Replies: 9
    Last Post: 22nd July 2013, 01:18 PM
  2. Creating a Single Instance of an object in a fastloop
    By Corlen in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 10th April 2013, 02:54 AM
  3. Clickteam Movement Controller only single instance?
    By ASD in forum Multimedia Fusion 2 - Technical Support
    Replies: 10
    Last Post: 18th November 2011, 01:00 PM
  4. Affecting only a single object instance
    By CrowbarSka in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 23rd January 2010, 02:35 PM
  5. Limit MMF2 to a single instance...
    By Simon in forum Multimedia Fusion 2 - Technical Support
    Replies: 11
    Last Post: 11th August 2006, 02:48 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
  •