Skip to main content
Known Participant
January 16, 2022
Question

Scanner doesn't find second instance of object

  • January 16, 2022
  • 1 reply
  • 193 views

Hello,

 

I have a simple script that checks if an object exists on the stage and returns that objects properties. However, this script only works during the first time the object is tested. If i delete the object from the stage, and add it back later on in the timeline, the object is no longer found. 

 

 

 

 

Here is a code sample. Is there some way to delete the object and recreate it for the scanning feature to function?

 

https://drive.google.com/file/d/1fFEMDH80YPql0su2UOtnRkWgd4DbpZCP/view?usp=sharing

    This topic has been closed for replies.

    1 reply

    Known Participant
    January 16, 2022

    Is there any help on this? I've been trying for months to figure this out. This is extremely simple in a modern programming language. all i want to do is:

     

    1. Check if an object exists.

     

    2. Return that object's properites.

     

    If the object has not been declared, it throws an error. There is no built in function to check if an object exists. Also, I can't use the same object more than once; the scanner won't find it. Please help, this should not be this hard.

    Legend
    January 17, 2022

    There should be no need to "scan" for your object existing. If you create the object at author time, give it an instance name, then you should be able to just check whether an object with that name exists. Likewise, if you dynamically create it at runtime, assign a property with its name to its container object.