edited September 18 in ORK Support
Hello !

I have trouble with an automatic machine. I have configured some of them to start at the start of the scene and after the machine plays it is destroyed.
However, when I save and then load this scene, the auto machine restarts as if it had never been destroyed.

it seems its not only the automachine but the destroyed gameobject that comeback everytime I load my save (in editor + with build).
Post edited by omeegaa on
  • Well ... yeah, that's how game objects work.
    If you destroy them, they're gone - but if you reload into the scene, they're back.

    If you want a machine to only execute once, you need to use variable conditions (or some other condition). You can add them to the Condition Settings of the machine component.
    You can use the Change After Execution settings to set variables after the machine finished executing, so you can do this outside of the schematic.
    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!
  • Ok I always believed that if in the game (in a build) an object was destroyed and we loaded the backup, this one kept the info that the scene had one less object^^
  • Nope, that's not the case - all of this has to be done manually.

    Beside using the conditions of a machine, you can also use Game Object Manager components to turn game objects on/off based on conditions.
    The manager is best used on a separate game object - e.g. if it disables itself, it's no longer working :D

    Also, there are Game Object Savers components to keep information like position, rotation, scale or local object variables of game objects between scene changes. But they can't manager enabling/disabling the object.
    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!
  • Ok so the best is to have these 2 managers to keep theses things up.

    For the moment I had circumvented the problem with an auto machine which made checks (like a completed quest or a specific object in the inventory) and depending on deactivates or activates the objects in question.
Sign In or Register to comment.