Difference between revisions of "DeleteWhenAble - ObjectReference"
→Notes: Added result of an issue I found with this function.
imported>Jbezorg m |
imported>Pickysaurus (→Notes: Added result of an issue I found with this function.) |
||
(One intermediate revision by one other user 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 24: | Line 29: | ||
== Notes == | == 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. ) | * 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. ) | ||