Forum rules - please read before posting.

Persist puzzle centric in world items across game sessions?

Hello!

So I am quite certain I've seen or read this in a tutorial, but I can't seem to find it at the moment.

Basically I am having an issue with items my character picks up re-appearing when I load the game again.

This sort of makes sense I guess as the in world object that represents the item will be "removed" (via an Object: Add or Remove action) but when the level is reloaded the game doesn't know that this item was removed through gameplay at some point in the past.

What's the best way to approach this? I thought maybe adding a Constant ID to the in world object would fix it (i.e. the object add remove would persist the state of that object if it had a constant id), but it doesn't seem to make a difference. 

Thanks!

Comments

  • I've been asking for a clean relaod option for awhile, this includes saving a game and loading the very saved game in the same scene.
     Hope one day this will be implemented.
  • Afaik this exists already... The Save/Load system is pretty powerful and usable. I've even piggybacked on it to write my own Quest Management and Achievements Management system using the ISave stuff to do persistence and it works really nicely/cleanly.

    I am pretty sure this is to do with me having missed something rather than a limitation with AC.
  • edited December 2015
    Try to trigger 2d animation sprite sheet and at the same time save it, then load it in the same scene you will see that your animation that you laucnhed before still runs. While it is not supposed to.

    Example you have an idle 2d animation of the Moon that shines, you call an animation Moon moves ( which playes for about 15 sec),  save your game, in the same scene load it, you will see 2 moons.

     But if you change your scene or quit the game than come back to play it,  you'll see one idle Moon as it should be.
     AC sort of doesn't reset the scene when the game is saved and loaded in the same scene, but sort of adds up whatever you had to whatever is still on the screen.
  • Oh I see now what you mean... interesting. In fact I find it interesting that based on what you're saying (although I've not experienced such issues myself) it sounds like AC is actually persisting some of the object state as it relates to its animation... which I find surprising. 

    I would have expected that the fact that you had triggered an animation would be completely ignored upon reload... Guess not, which is nice, although what you are describing definitely doesn't sound ideal either.

    I can't really comment on any of that so I'll let Chris or someone else do so. 
  • @SkyTree: An option to reset the scene will be included in v1.50.

    @oxyscythe: If you want to save an object's presence in the world (or lack thereof), attach the RememberTransform component and check Save scene presence?
  • Ah of course! That simple :) Brilliant, cheers Chris!
  • edited December 2015
    Glad your on the case Chris,

    But, i dont know why ppl are having so much trouble, i'm finding it not that much work to setup.

    My OnStart has a custom->run in parallel  and this does everything i need it too when starting the scene, checking for items in scene, positioning characters etc

    So, once this is complete, i create a OnLoad and pretty much copy the run in parallel, After from one or two tweaks, its the same.
  • similar approach here. I also usually just place the common setup in an interaction (in the scene or as an asset depending on my needs) and just call that from both places instead. means if...er... *when* I later realise I've forgotten to do something I just do it once in the common interaction rather than update it in two places
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.