lorenzo19 Posted October 27, 2013 Share Posted October 27, 2013 I'm trying to write a scripted misc item that removes itself from certain containers that I don't want it to be in. Narrowed down the problem to this fragment. The RemoveMe causes the crash. BEGIN OnAdd Set rContainer to GetContainer if rContainer != PlayerREF && iTemp == 0 Set iTemp to 1 RemoveMe endifEND ONAdd Per BethSoft... It does not cause crashes when used in the OnAdd block. I wish that was actually true. Then I wouldn't be having this problem. I have tried every which way including loose. To quote a movie title. Every thing i try gets the same result: crashed game. I have tried persistent containers, non-persistent containers, tried RemoveItem. Tried adding the item via script and via the container menu. Tried putting RemoveMe in the GameMode block and waiting 1, 2, 10 and 20 frames. put in the all guards to prevent infinite loops to ensure that RemoveMe only runs once. Have a feeling RemoveMe is a dead end road. DropMe seems to work, but I rather not use DropMe because I am using the OnDrop block for another purpose. Link to comment Share on other sites More sharing options...
lorenzo19 Posted October 27, 2013 Author Share Posted October 27, 2013 Got it working with DropMe. Added a layer of complication but at least it works now. Still a bit of a mystery because I have used RemoveMe before on non-actors and non-persistant containers, and it worked as expected. Link to comment Share on other sites More sharing options...
Recommended Posts