Jump to content

Deleting spawned hazard objects fails


SKKmods

Recommended Posts

Spawning controller objects and then actors, lights, hazards linkerefed to them with abDeleteWhenAble = false to aviod them being automatically scavenged OnUnload before the script deletes them.


When scripted cleanup happens everyting is cool operationally EXCEPT every time the script tries to delete a HAZARD it pops a log:


error: Cannot delete a None object


Even though every single call is validated for None. This doesnt happen with any other object type I have tried to spawn and cleanup:




If (ThisObject != None)
ThisObject.Disable()
If (ThisObject != None)
ThisObject.Delete() ;error: Cannot delete a None object !!!
Endif
EndIf



But if the hazard is spawned abDeleteWhenAble = true it cleans up fine without the error, but then it does get automatically scavenged OnUnload befroe any scripted commands, so has to be recreated every OnLoad.


If spawned abDeleteWhenAble = false the hazards are never ever scavenged even after a scripted Disable and failed Delete. Do a FindAllObjectsOfType search and they still turn up.


Anyone hazard (ho ho) a guess as to WHY this is happening specifically with that object type and no others (I have found) ?

Link to comment
Share on other sites

  • Recently Browsing   0 members

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