Difference between revisions of "DeleteWhenAble - ObjectReference"

→‎Notes: Added result of an issue I found with this function.
imported>Scornett
m (Reverted edits by Scornett-Bot (talk) to last revision by Jlundin)
 
imported>Pickysaurus
(→‎Notes: Added result of an issue I found with this function.)
 
(2 intermediate revisions by 2 users not shown)
Line 9: Line 9:
<source lang="papyrus">
<source lang="papyrus">
Function DeleteWhenAble()
Function DeleteWhenAble()
While GetParentCell() && GetParentCell().IsAttached()
Utility.Wait(5)
EndWhile
Delete()
EndFunction
</source>
</source>


Line 22: Line 27:
TempReference.DeleteWhenAble()
TempReference.DeleteWhenAble()
</source>
</source>
== Notes ==
* DeleteWhenAble() will pause the current script and will not return until the object has been deleted successfully.
* Using DeleteWhenAble() within a scene can cause it to stall. ( This needs independent verification. My assumption is that the scene is waiting for the operation to complete. )


== See Also ==
== See Also ==
*[[ObjectReference Script]]
*[[ObjectReference Script]]
*[[Delete - ObjectReference]]
*[[Delete - ObjectReference]]
Anonymous user