LarryG on 16/9/2014 at 22:37
I need to delete a stack of a given archetype found in the Player's inventory. Any suggestions?
Edit:
What I ended up doing:
* I created a special stim
* I put a receptron for the special stim on the archetype, set to Destroy Object: Me
* I put a receptron on the Player for that stim, set to Permeate Container
* I used an NVRelayTrap to send the stim to the Player
It works, but seems awfully roundabout. I just haven't found a more direct route which actually works.
R Soul on 16/9/2014 at 23:03
Send a stim the to Player (best done with NVScript and a design note).
Find the Garrett archetype and add a receptron. Effect: Permeate into container. Target: me, Edit Effect: Coefficient: 1
Every contained object will be receive the stim.
Edit the stack's archetype and give it a receptron for the stim (destroy object: me).
LarryG on 16/9/2014 at 23:18
Posts crossed in the mail. That's what I ended up doing.
R Soul on 16/9/2014 at 23:40
If the objects are put into your inventory straight from the hierarchy (as with (
http://dromed.whoopdedo.org/tnhscript/trapdispenser) TrapDispenser or NVCreateAndLink), and there are none just lying around in the mission, you might be able to use NVDeleteTrap.
Design note: NVDeleteTrapTarget="@ArchetypeName" (@ = all instances of).
LarryG on 17/9/2014 at 00:18
I tried that, in fact it was the first thing I tried, but it didn't seem to work, I assume because it doesn't work on contained items. (?)
Thanks.
john9818a on 17/9/2014 at 20:23
With s special stim on the objects could you just stim the entire map using alarge radius?
LarryG on 17/9/2014 at 21:16
Stims don't permeate into containers unless the container has a permeate into container receptron to pass it along.
john9818a on 18/9/2014 at 12:42
I tried to use s&r to remove a stack of gears from my inventory in a test but all it did was remove the image of the gear. The stack qty remained. I vaguely remember someone asking this same question years ago but don't remember who. Its easy to destroy a stack in inventory if you know the first object's number, but if the player can pick up and drop /use objects before they need to be destroyed the only way to use a destroytrap is to link all of the objects the player could pick up that need to be destroyed. That way no matter which one is picked up first all will be affected.
LarryG on 18/9/2014 at 13:53
In this case, the Player can't drop them and there are none that are not contained by the Player. The solution that works for my case is:
* create a special stim
* put a receptron for the special stim on the archetype, set to Destroy Object: Me
* put a receptron on the Player for that stim, set to Permeate Container
* use an NVRelayTrap to send the stim to the Player
john9818a on 18/9/2014 at 22:43
Great! I'm glad you got it working Larry!! :)