User Tag List

Results 1 to 6 of 6

Thread: Detecting when an object is 'destroyed' problem...

  1. #1
    No Products Registered

    Join Date
    Dec 2008
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Detecting when an object is 'destroyed' problem...

    Question:

    Is there a way to detect when an object is actually destroyed?

    The problem I am running into is that I have all of my actions tied to the condition statement, whether or not the object actually exists. So:

    If string$ = "67", then object is destroyed and points are added. However, string$ can actually equal "67" even when the object was not on the screen to begin with, and in that case the points are still added.

    Any thoughts? The screen shot below should help highlight the problem (nevermind that I probably have more conditions then needed; I'm still on the beginning learning curve). Flags are used to add points and play sounds.

    http://www.carolinarover.com/appletreeproblem.JPG

  2. #2
    No Products Registered

    Join Date
    Jan 2008
    Posts
    146
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Detecting when an object is 'destroyed' problem...

    You can count the number of "C-appels".

    1) Insert event (together with string$=67)
    2) Rightclick special object (top left)
    3) Select "compare two general values"
    4) Retrieve data from an object
    5) Rightclick the "C-appel" object
    6) Select count-> number of objects
    7) Select is greater then 0

  3. #3
    Clicker Fusion 2.5
    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)

    Join Date
    Oct 2006
    Location
    In a Dark room with only a lamp
    Posts
    367
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Detecting when an object is 'destroyed' problem...

    I think you may hve a problem with your code in the fact that you are destroying an object and then toggling flags.

    Try placing your destroy event at the end of the event list. Not sure if this will resolve the issue you are having but it may go some way towards it.

  4. #4
    No Products Registered

    Join Date
    Oct 2006
    Location
    Sweden
    Posts
    1,141
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Detecting when an object is 'destroyed' problem...

    It makes no difference since the object won't be destroyed until the end of the event loop. Until then it will act like normal.

  5. #5
    No Products Registered

    Join Date
    Dec 2008
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Detecting when an object is 'destroyed' problem...

    I tried counting as Sieg suggested and moving events around, but I'm still picking up false inputs. I may go back and rework everything with a different method. Thanks for the ideas guys.

  6. #6
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)

    Re: Detecting when an object is 'destroyed' problem...

    Just set a flag on and when the flag is triggered on then destroy it.
    Working as fast as I can on Fusion 3

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. Detecting multiple destroyed duplicated objects?
    By Konidias in forum Multimedia Fusion 2 - Technical Support
    Replies: 16
    Last Post: 28th December 2010, 08:34 PM
  3. Objects destroyed next frame Problem
    By HyperspazzMan in forum Multimedia Fusion 2 - Technical Support
    Replies: 8
    Last Post: 3rd July 2010, 04:19 AM
  4. Last coin has been destroyed problem
    By Rabagast in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 2nd December 2008, 05:58 PM
  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
  •