Jump to content

Papyrus Array Question


Feliks

Recommended Posts

I've been scripting a lot lately and I noticed that the entire thing I'm building right now is predicated on a fact that I am taking for granted. If I'm applying an effect to the player or an NPC and I'm using data stored in an array to do so, will the array store its data when the player saves and quits the game? or loads for that matter? Or do I need to find a way to save the data independent of the array to reaccess it when the game is quit and started back up?

Link to comment

I'm pretty sure they're stored, but you could always test that with an FF spell that uses a 10-second Script MagicEffect (you save immediately asfter casting it), where the script is just:

int[] myIntArray

Event OnEffectStart(Actor akTarget, Actor akCaster)
myIntArray = new int[3]
myIntArray[0] = 0
myIntArray[1] = 1
myIntArray[2] = 2
endEvent

Event OnEffectFinish(Actor akTarget, Actor akCaster)
if myIntArray[0] + myIntArray[1] + myIntArray[2] == 3
Debug.Notification("My mod's gonna be awesome!!")
else
Debug.Notification("I'm screwed...")
endif
endEvent
Link to comment

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use