Do properties 'restart' their values?

Post » Wed Jun 20, 2012 8:33 am

I have this script, and after it gets done doing what its doing (which involves changing the values of several of its properties) it stops the quest its in. Later (when the player levels up again) the quest restarts from the beginning. What I'm wondering is, do the properties of the script go back to their default values when the quest is started up again (bad) or do the values remain changed?
User avatar
El Goose
 
Posts: 3368
Joined: Sun Dec 02, 2007 12:02 am

Post » Wed Jun 20, 2012 3:13 am

Anyone?
User avatar
Chloe Yarnall
 
Posts: 3461
Joined: Sun Oct 08, 2006 3:26 am

Post » Wed Jun 20, 2012 2:15 am

Yes, when quests are started they receive a reset().

Any registered events will already be gone as they happen at Stop()
All properties and vars take on their initial values.
The OnInit() block is run
Then the OnReset() block is run.
It's startup stage fragments will run.

So yeah if you need any data to carry over you need to store it elsewhere.
User avatar
Evaa
 
Posts: 3502
Joined: Mon Dec 18, 2006 9:11 am

Post » Tue Jun 19, 2012 11:48 pm

Yes, when quests are started they receive a reset().

Any registered events will already be gone as they happen at Stop()
All properties and vars take on their initial values.
The OnInit() block is run
Then the OnReset() block is run.
It's startup stage fragments will run.

So yeah if you need any data to carry over you need to store it elsewhere.

Damn. Thanks.
User avatar
Kat Lehmann
 
Posts: 3409
Joined: Tue Jun 27, 2006 6:24 am

Post » Wed Jun 20, 2012 7:43 am

As it turns out I was already storing the learned spells as globals, so with a little revising I took care of the problem. Thanks for the help guys.
User avatar
Hazel Sian ogden
 
Posts: 3425
Joined: Tue Jul 04, 2006 7:10 am


Return to V - Skyrim