Re-initialize CK array OnInit?

Post » Fri Oct 24, 2014 4:24 am

I have run into a very strange behavior and I am looking for a workaround.

Basically, I have an Array[] Property on my Quest script and have defined the values inside the CK. These values are apparently "baked" into a save game.

I later had to go in and re-assign some of those values as they were input incorrectly. However, the script that checks these values still thinks it is populated by the old values. In other words, the game engine completely ignores changes to an array defined in the CK and goes by what the save game thought they were.

Is there any way to force the game to stop being [censored] and read the new values from the .ESP?
User avatar
Lawrence Armijo
 
Posts: 3446
Joined: Thu Sep 27, 2007 7:12 pm

Post » Thu Oct 23, 2014 4:22 pm

Well, I figured it out.

Basically, I needed to create a duplicate array with the correct variables on my update script which runs once each time the game loads, and then set the array on the script I changed to equal that new array.
User avatar
Sarah Evason
 
Posts: 3507
Joined: Mon Nov 13, 2006 10:47 pm

Post » Thu Oct 23, 2014 6:01 pm

Yes, unfortunately this is true of any script property whose value you fill in the CK. The CK-filled value is only read the very first time the script is loaded. After that it uses whatever value it already had, since all property & variable values for scripts are stored in the savefile.

User avatar
Blessed DIVA
 
Posts: 3408
Joined: Thu Jul 13, 2006 12:09 am


Return to V - Skyrim