AtomsChosen Posted December 16, 2023 Share Posted December 16, 2023 I decided to make Workshop Robots unprotected in the creation kit. However a problem I am running into is that when these robots die, their corpses don't disappear. What determines if corpses are able to disappear and how would I go about making permanent corpses disappear with the corpse checks the game does? Link to comment Share on other sites More sharing options...
LarannKiar Posted December 18, 2023 Share Posted December 18, 2023 (edited) Depending on the robots and your design, you could try these: - unchecking the Respawn flag on their Actor record (then waiting for/performing manually a Cell reset) - attaching a script to them then call/remotely calling Disable() on them OnUnload - manually removing the corpses with Delete() (note: unless they're promoted to be persistent ([PP]) a conventional Delete() or even the console function "MarkForDelete" should work) - use a script extender that force-deletes them even if they're persistent (not recommended for published mods and should only be used if you're at least 100% sure you know what you're doing) Edited December 18, 2023 by LarannKiar Link to comment Share on other sites More sharing options...
AtomsChosen Posted December 22, 2023 Author Share Posted December 22, 2023 Okay. Thank you for the info. Gonna experiment with these. Link to comment Share on other sites More sharing options...
Qrsr Posted January 14, 2024 Share Posted January 14, 2024 @LarannKiar, isnt there a default script that would disable the container, e.g. the actor? Im asking because im searching for a default script which does precisely this but not just for actors, disables them when done. I could use fragments of the noodle cup script in fallout 4 though, but it will only work on activators. Link to comment Share on other sites More sharing options...
LarannKiar Posted January 15, 2024 Share Posted January 15, 2024 (edited) 12 hours ago, Qrsr said: @LarannKiar, isnt there a default script that would disable the container, e.g. the actor? Im asking because im searching for a default script which does precisely this but not just for actors, disables them when done. I could use fragments of the noodle cup script in fallout 4 though, but it will only work on activators. Unfortunately I don't know about any vanilla default script that remote disables object references but if you fill the container references into a ReferenceCollectionAlias then basically this script should work: Make sure to attach it to it to your RefCollectionAlias. Scriptname YOURSCRIPTNAME extends RefCollectionAlias Const Event OnUnload(ObjectReference akSenderRef) ; event is sent automatically (i.e., without even registration) when one of the reference in the RefColl (that Papyrus calls it "akSenderRef") gets unloaded If akSenderRef as Actor ; try to cast akSenderRef as Actor to check if akSenderRef is an Actor If (akSenderRef as Actor).IsDead() == true If akSenderRef.IsDisabled() == false akSenderRef.Disable() EndIf EndIf EndIf EndEvent "Basically" because it doesn't check whether the actor has a Quest Item in their inventory or is persistent or is flagged as temporary ([T]) flag in the console, so eventually it would get disabled even deleted OnUnload if the reference is not persistent anyway) but if you determine, thus know exactly what reference may end up in the RefColl and will get disabled OnUnload then I think it should be okay in most cases. Edited January 15, 2024 by LarannKiar Link to comment Share on other sites More sharing options...
SKKmods Posted January 15, 2024 Share Posted January 15, 2024 Would you not want to also Self.RemoveRef(akSenderRef) when done so it is not held persistent by the collection pointer ? Link to comment Share on other sites More sharing options...
LarannKiar Posted January 15, 2024 Share Posted January 15, 2024 13 minutes ago, SKK50 said: Would you not want to also Self.RemoveRef(akSenderRef) when done so it is not held persistent by the collection pointer ? Good point. If akSenderRef.IsDisabled() == false akSenderRef.Disable() Self.RemoveRef(akSenderRef) EndIf Link to comment Share on other sites More sharing options...
Recommended Posts