» Wed Jun 20, 2012 8:16 am
New day, let's see if I can get this to work now.
There are two problems: The script works fine if I drop only one trap from each category (iron, steel). But if I drop a second of either type when there's a trap out the script only works about 33% (<- me guessing) of the time. It seems to work best if I drop a trap, wait for about a minute, then drop the second trap. if I drop a trap wait only a few seconds and then drop the next trap chances are there's gonna be a dummy item on the ground, instead of the activator. Again this does not apply when dropping traps of different types (iron, steel).
The iron and the steel trap script are exactly the same, the only thing that is different is my pre-set properties; which points at different activators. (And, of course, the fact that they are attached to two different dummy items.)
I am guessing it's either the properties or, more likely, the script itself that messes things up.
The second problem, probably a bi-effect of the first problem: if I drop several traps at once it ends up spawning the first trap, then a bunch of dummy items. (As if the script is unable to fire fast enough.) I am guessing that solving the first problem automatically solves the second problem.
EDIT: I tried dropping 7 pieces of coal at the same time. They ended up being one piece of coal with a "(7)" - meaning I can pick them up with a single click, instead of one click per coal.
I knew that gems, such as rubies does not stack this way; so dropping 7 would mean I have to click "E" 7 times to pick them all up again. I thought this might be the problem.
I based my Dummy item on a ruby instead of a piece of coal, but it still doesn't work. Same problems as before. =(
EDIT #2: It seems that whenever I stack up my dummy items in my inventory the script only runs on "the first item". For example: I pick up one dummy and drop it - works perfectly. I pick up three dummies and drop only one. -If it is the "first" item the trigger works perfectly. If I then decide to drop the two others, without picking up the "first", nothing happens - the dummy items are dropped and the script does not run. So I have to pick them all up and "cycle through" them. The easiest way to do this was to drop all three, then pick them up. If I drop all three again the first item dropped will work. The other two will be dropped as dummy items (not working).
-Is there a way to keep traps from stacking in the inventory? (Make them "unique" or something.) I know it will clutter up the inventory and look really ugly, but I would prefer that over forcing the player to only own one trap at a time.
EDIT #3: Would it be possible to count the number of dummy items in the player's inventory before and after the drop?