NexusComa Posted December 9, 2016 Share Posted December 9, 2016 (edited) Is there anyway to check by name what objects are there in a cell.Then delete a group of them by name ... After a code I have many custom Xmarkers ( have a common baseobject with the same name ).I want to be able to clean them up maybe some type of code off OnLoad().... any one know a way to do this ? Or Just a way to kill all enemy's in a cell ... from script just like how killall works from the console Edited December 9, 2016 by NexusComa Link to comment Share on other sites More sharing options...
FrankFamily Posted December 9, 2016 Share Posted December 9, 2016 I know you hate me but whatever... If i understant correctly you want to delete all (or some?) of the references of a certain custom form from a cell, right? I'm thinking you could make a loop with FindRandomReferenceOfType and add them to an array checking they are not already there, depends on how random it is but after enough loops you should have an array with all the references of that form in the cell.Or just delete them on the loop so they don't come up again in the search until none come up. Not sure if delete would be that instant, maybe move them to another cell. FindClosestReference... could also work if they are deleted/moved away as they come up in the search.Sort of hacked FindAllReferencesOfType which i think exists on Fo4 but not on skyrim. Link to comment Share on other sites More sharing options...
NexusComa Posted December 10, 2016 Author Share Posted December 10, 2016 I don't hate anyone, at all ... Thanks for the info i'll look into it. Link to comment Share on other sites More sharing options...
mrpwn Posted December 10, 2016 Share Posted December 10, 2016 SKSE added GetNumRefs and GetNthRef functions to the Cell script, if SKSE is an acceptable dependency for your mod. Link to comment Share on other sites More sharing options...
Recommended Posts