Items not saving after destroy

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
User avatar
supadupa64
Posts: 200
Joined: Sun Mar 06, 2016 9:40 pm
Contact:

Items not saving after destroy

Post by supadupa64 »

Ok, so I save a game, pick up a new quest and collect some of the items for that quest. If I load the game I just saved and go back to where I was and pick up the quest I was just on the items are gone... I'm using increment on destroy script and destroy on use.

But there is a slight problem that I think might be making this worse. I get an error when I try to use the mouse scroll (besides the fact that the scroll doesn't work) in the inspector window and from what I can tell it only does this in the windows where I am using dialogue system scripts. I just noticed it recently. I did just install Unity 5.4.1 but it was doing it before that. I thought upgrading might fix it.

Maybe it's just corrupted?
mousescroll.jpg
mousescroll.jpg (140.46 KiB) Viewed 3082 times
User avatar
Tony Li
Posts: 23260
Joined: Thu Jul 18, 2013 1:27 pm

Re: Items not saving after destroy

Post by Tony Li »

It looks like a problem with the custom inspector GUI for the Condition section. Can you remove and re-add the Increment On Destroy component? Maybe something's corrupt in the Condition. Also, if possible please update to the latest version of the Dialogue System. (And as always please back up your project before updating any asset including the Dialogue System.)
supadupa64 wrote:Ok, so I save a game, pick up a new quest and collect some of the items for that quest. If I load the game I just saved and go back to where I was and pick up the quest I was just on the items are gone... I'm using increment on destroy script and destroy on use.
Isn't this what should happen with Persistent Destructible?

Or are you loading a saved game that was saved before you picked up the crate?
User avatar
supadupa64
Posts: 200
Joined: Sun Mar 06, 2016 9:40 pm
Contact:

Re: Items not saving after destroy

Post by supadupa64 »

I discovered that the "increment on destroy" is making the scroll mouse not work. I took it out and it all works perfect. I added a new "increment on destroy" script and it happens again. It just becomes unstable, although it doesn't seem to actually impact gameplay on all my objects. I'll test it again. The display does get messed up.

Watch here: https://www.youtube.com/watch?v=OP2ucB8 ... e=youtu.be

This hasn't been a problem in the past, just recently and I can't remember if I did anything to create this. I did create a copy of maybe 20 objects all with the script, but that's about all I can remember.

I also updated to DS 1.6.6.4
I also updated to Unity 5.4.1
User avatar
Tony Li
Posts: 23260
Joined: Thu Jul 18, 2013 1:27 pm

Re: Items not saving after destroy

Post by Tony Li »

I'll look at Increment On Destroy and send you a fix in the next few days.

Do you recall the Condition you had set on it?
User avatar
supadupa64
Posts: 200
Joined: Sun Mar 06, 2016 9:40 pm
Contact:

Re: Items not saving after destroy

Post by supadupa64 »

I'm not using a condition on those. It's blank.
User avatar
Tony Li
Posts: 23260
Joined: Thu Jul 18, 2013 1:27 pm

Re: Items not saving after destroy

Post by Tony Li »

In the short term (until I post the fix), please try collapsing the Condition foldout. The custom inspector GUI for the Condition section (specifically the Lua wizard part of the Lua section) is running into an issue and causing the Increment On Destroy inspector to display improperly.
User avatar
supadupa64
Posts: 200
Joined: Sun Mar 06, 2016 9:40 pm
Contact:

Re: Items not saving after destroy

Post by supadupa64 »

Great idea, I collapsed it and it works great. Weird that this is happening.
User avatar
Tony Li
Posts: 23260
Joined: Thu Jul 18, 2013 1:27 pm

Re: Items not saving after destroy

Post by Tony Li »

Not so weird once you know what's happening. Unfortunately it's a bug in the Lua wizard GUI code. If GUI code runs into an unhandled error (like in this case), it screws up the inspector. But I'll get it fixed soon! :-)
Post Reply