Description
Wiki Description
Flags this object reference as wanting to be deleted. A reference that is flagged for delete will be deleted as soon as:
- It is no longer in a script property
- It is no longer registered for updates
- It is no longer being watched for Anim Events
- It is no longer held in a quest Alias
Only references created in game can actually be deleted.
Documentation Comment
Delets this object
Caveats
CK Wiki - Notes
- Delete is valid for unique actors only. Please waive from using it on respwning/leveled actors. It will destroy spawn points as you will not delete the spawned actor, but the leveled instance marker. Please use code similar to this to prevent respawn destruction. Actor.SetCriticalStage(...) Source
-
Victim.SetCriticalStage(Victim.CritStage_DisintegrateEnd)
- Remember that Delete() only flags an object for deletion; the actual deletion takes place later. Per this USKP discussion, if a variable still points to the object, the object will remain temporarily persistent; the deletion won't occur until that variable is cleared (i.e. by setting it to None).
Examples
; Deletes the specified reference
TempReference.Delete()Auto-Generated Example
myObjectReference__toCallFunctionOn.Delete()