Try that, please.
Let me know how you go.
I would, but I got excited and did something rash. I do that a lot.. I removed all the global/array variables, properties and whatnot. (They were just temporary anyway, and I used them to test an idea I had.)
I got excited because I realized that "Self" points at the script. So I guessed that "Delete()" = "Self.Delete()" meaning the script would get destroyed and only run once.
I figured that there has to be a way to point at the "ObjectReference" (or whatever it's called), instead of pointing at the script. -That way I could keep the script and destroy the actual item.
Anyway, here's the script that I'm trying to get to work:
Scriptname HT_PlayerDropTrap extends ObjectReference {A script that will replace the dummy item with an actual trap when the player drops it.}Activator Property HT_TrapActivator Autoevent OnContainerChanged(ObjectReference akNewContainer, ObjectReference akOldContainer) if (akOldContainer && !akNewContainer) Self.PlaceAtMe(HT_TrapActivator) Delete() endifendeventWhat it does is: when I drop the dummy item that the script is attached to it removes the items and replaces it with an activator.
What's wrong with it: It only does this once. If I drop several items only the first once is turned into an activator, the rest are dropped as dummy items.
-I figured that if I "Delete()" the actual MiscObject, instead of the script it might work the way I want it to?
EDIT: For example:
MiscObject HT_Whatername Auto;event ;Other actions.. HT_Whatevername.Delete();endevent