Page 1 of 1

How do you reset Sim Status?

Posted: Fri Jul 21, 2017 12:54 pm
by Abelius
Hi there,

I've looked for this in the forum and the manual but could find anything specific (as the search feature of the manual doesn't even return results with "sim status").

I need to reset Sim Status values for ALL conversations. I plan to run this action when running a "Quit to Main Menu" button.

Is there any straightforward method to achieve this?

Thank you!

Re: How do you reset Sim Status?

Posted: Fri Jul 21, 2017 1:03 pm
by Tony Li
Will it work for you to reset the entire database? This includes SimStatus as well as current variable values, etc. To do this, use DialogueManager.ResetDatabase() in a script, or use the equivalent visual scripting action (e.g., in PlayMaker).

Re: How do you reset Sim Status?

Posted: Fri Jul 21, 2017 2:17 pm
by Abelius
Thank you Tony. I didn't notice that method.

My problem now it's that if I call that method twice, the second time the PlayMaker action is run, it can't find the instance of the database, probably due to Adventure Creator resetting "something".

I'll try to run it as a pure script at OnStart and see if that way it's able to find itself. :P

Re: How do you reset Sim Status?

Posted: Fri Jul 21, 2017 2:35 pm
by Tony Li
If that doesn't do the trick, please post the error message you're getting. I may be able to suggest a solution.

Re: How do you reset Sim Status?

Posted: Fri Jul 21, 2017 3:01 pm
by Abelius
It has worked using a plain script.

I suspect PlayMaker isn't able to find the instance a second time because Dialogue Manager is put into Don't Destroy on Load...

Image

...AND Adventure Creator does something strange when using its own 'Restart Game' action.

But I wouldn't know, as I'm no programmer in the first place. :?

Anyway, this other way of executing the method is working fine.

Thank you for your support.

Re: How do you reset Sim Status?

Posted: Fri Jul 21, 2017 3:13 pm
by Tony Li
Happy to help! Glad it's working now.