Forum rules - please read before posting.

Object Deleted, when loaded saved object back in scene

I know this is all me and have tried dozens of things to work this out. I have come up empty
and could use some help.

I have a gas can in game
using a hotspot :

 I pickup the gas can,
 get inventory item
hotspot disables
gas can object is deleted

save game.......

start game again

load....

gas can in inventory : check
hotspot still disabled : check
gas can not there : Failed

Gas Can object in scene waiting to be picked up again but can not because the hotspot is disabled, as it should be

How do I set the object up to save its state?
I have Remember Vis on the object but that doesnt do anything besides laugh at me as it sits there after I load the game back.

Comments

  • Setting a Global : Gas Can Picked Up true/false
    and have a cut scene On Load does the trick

    Im going to have a Ton of  changes to the scene. A ton!

    Is using a cut scene on load the best course of action?

    This includes : Levers animation states, Lights on and off, so on and so forth.
  • The "Cutscene On Load" trick is generally for animation states - in the case of the gas can, it shouldn't be necessary.

    Instead of deleting the object, you could just make it invisible - attach the RememberVisibility script to save this.

    But if you need to delete it, attach the RememberTransform script.  Then check "Save scene presence", "Retain ID in prefab", and place the prefab in a Resources folder.  It's a little more tricky, but that should do it.

    As for lights, you could try teleporting it far out of the way when not needed - the RememberTransform script will again help here, but no need to save the scene presence.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.