Hello,

Making good progress, just was wondering if in an event if there was a way to if you had found multiple objects, only activate one designated one with the 'Active Object' node and also Deactivate a designated object the same way.

I tried removing the found object I want activated later in the event, but it appears that doesn't work once it is deactivated so once it activates in my event it ends up turning all of the found objects back on rather than just the one I want.
  • How are you selecting that designated game object?

    Found objects are just a list of all the objects you put into it, so adding or removing an object will just do that. Once they're disabled, Unity will not be able to find them via the Search Objects node, though - so you'll have to keep that selected object somewhere to be able to access it.

    There are also the global objects available, which keep the object references even after the event ended (but they'll still be gone when the game object is destroyed, e.g. by changing scenes).
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • edited July 31
    Thanks for the fast reply,

    I'm using a node at the beginning of my event to Search and Add objects by name. I have two of these nodes to find two separate objects that are in the scene but i want deactivated until they are needed in the event.

    So I have another node deactivating the found object's and then when I need them in the event I have a activate object node, but this activates both the found objects when I only need one at that time and then need one to activate later.

    I tried searching, deactivating, and then removing one object so I could later read the object through a search but since it was deactivated it wouldnt let me add it to my found objects.

    Sorry if what I'm trying to do isn't super clear, I'm trying to explain it best I can

    Edit: One other thing I want to add just to see if I can get this answered when you are available, if I have a sound Paused with the "Stop Sound" node, how do I get it to resume playing again? I tried using another Play Sound node and it did resume playing but it starting looping the same track again over on top of it so it was playing two of the same track with one slightly delayed. Thanks again gamingislove for all you do.
    Post edited by supportreport1 on
  • If the objects are placed in your scene (i.e. in the scene view) and not spawned while playing the game, you can use them as Object type actors (without enabling Event Object) - this allows you to select them in the event interaction and you'll be able to access them even if they're disabled.

    Otherwise, you'll have to keep the object stored somewhere (e.g. found/global objects or selected data) to be able to still use it - as said, searching deactivated game objects isn't possible, Unity can't find them any longer ...

    As for continuing playing a sound - I don't think there's a designated node available for that, but you can use a Call Function node for this.
    - component name: AudioSource
    - function name Play
    no parameters :)
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Wow that Object Type Actor is going to be such a savior when it comes to setting up what I want to do. Thank you for opening my eyes to that, sometimes it seems like it can be easy to overlook something simple, but I really appreciate you responding quickly and effectively. The sound fix worked too, you are really the best thank you for all the help my game is looking great because of your help. ^^
Sign In or Register to comment.