Difference between revisions of "Talk:Persistence (Papyrus)"

From the CreationKit Wiki
Jump to navigation Jump to search
imported>LukeH
(Created page with "===What does NOT make reference persistent, that you may expect like me it does:=== - adding references to a FromList doesn't make them persistent even if you keep a reference...")
 
imported>Threedee
Line 1: Line 1:
===What does NOT make reference persistent, that you may expect like me it does:===
===What does NOT make reference persistent, that you may expect like me it does:===
- adding references to a FromList doesn't make them persistent even if you keep a reference to the FormList in your script. Doing this may endup with GetAt(index) returning None from the list when changing cell and returning again the correct value when going back where you was when you added them. This was tested with Actor (dead actors) references but I expect it to be valid for any reference, yet I don't have time to test that now, I'm also curious how it works if you add the reference to an array.[[User:LukeH|LukeH]] 05:19, 21 March 2012 (EDT)
- adding references to a FromList doesn't make them persistent even if you keep a reference to the FormList in your script. Doing this may endup with GetAt(index) returning None from the list when changing cell and returning again the correct value when going back where you was when you added them. This was tested with Actor (dead actors) references but I expect it to be valid for any reference, yet I don't have time to test that now, I'm also curious how it works if you add the reference to an array.[[User:LukeH|LukeH]] 05:19, 21 March 2012 (EDT)
== An object CAN unload while a function is running on it. ==
If an object persists when it has a running function on it, then how do you explain an error such as this:
<source lang="Papyrus">[08/15/2012 - 11:10:58PM] error:  (FF000DFE): has no 3d, and so cannot have its motion type changed.
stack:
[ (FF000DFE)].critterMoth.SetMotionType() - "<native>" Line ?
[ (FF000DFE)].critterMoth.BellShapeTranslateToRefAtSpeed() - "Critter.psc" Line 556
[ (FF000DFE)].critterMoth.BellShapeTranslateToRefNodeAtSpeedAndGotoState() - "Critter.psc" Line 639
[ (FF000DFE)].critterMoth.GoToNewPlant() - "CritterMoth.psc" Line 273
[ (FF000DFE)].critterMoth.OnUpdate() - "CritterMoth.psc" Line 138
</source>
This error occurred because the critter unloaded while a function was running on it.

Revision as of 05:57, 16 August 2012

What does NOT make reference persistent, that you may expect like me it does:

- adding references to a FromList doesn't make them persistent even if you keep a reference to the FormList in your script. Doing this may endup with GetAt(index) returning None from the list when changing cell and returning again the correct value when going back where you was when you added them. This was tested with Actor (dead actors) references but I expect it to be valid for any reference, yet I don't have time to test that now, I'm also curious how it works if you add the reference to an array.LukeH 05:19, 21 March 2012 (EDT)

An object CAN unload while a function is running on it.

If an object persists when it has a running function on it, then how do you explain an error such as this:

[08/15/2012 - 11:10:58PM] error:  (FF000DFE): has no 3d, and so cannot have its motion type changed.
stack:
	[ (FF000DFE)].critterMoth.SetMotionType() - "<native>" Line ?
	[ (FF000DFE)].critterMoth.BellShapeTranslateToRefAtSpeed() - "Critter.psc" Line 556
	[ (FF000DFE)].critterMoth.BellShapeTranslateToRefNodeAtSpeedAndGotoState() - "Critter.psc" Line 639
	[ (FF000DFE)].critterMoth.GoToNewPlant() - "CritterMoth.psc" Line 273
	[ (FF000DFE)].critterMoth.OnUpdate() - "CritterMoth.psc" Line 138

This error occurred because the critter unloaded while a function was running on it.