LarryG on 28/2/2016 at 08:09
I've got a situation where 8 items need to send TurnOn to a RAT. Once the RAT fires, I need it to be reset so that those 8 items are again needed for the next time. And to make matters worse, the 8 items I have will never send a TurnOff to the RAT.
Now I'm thinking that NVLinkBuilder might be used to remove the 8 ScriptParam links that the RAT uses to keep track of who sent a TurnOn. My idea is to have NVLinkBuilderOff=TurnOn and CD the RAT to the LinkBuilder marker. NVLinkBuilder only allows multiples up to 4, so I'll need two of them. It should work, I just wish there were a simpler way to remove 8 ScriptParam links from a RAT.
Any ideas?
Nameless Voice on 28/2/2016 at 15:21
You could use old-school pseudoscripting (e.g. a conversation) to add/remove links in bulk.
Here's another possible solution, though it might be needlessly complex:
Hook each of your devices up to qvar traps, using a bitwise operator to set a bit in the quest variable.
Set up a qvar trigger to listen for the value of all the bits being on (presumably 255, with 8 devices.)
You can reset the arrangement by setting the qvar to 0.
R Soul on 28/2/2016 at 15:26
It might be better to give the triggering objects a metaprop that uses NVRelayTrap to send TurnOff when receiving a stim. When the RAT is activated, it can trigger another NVRelayTrap that sends that stim to "@archetype-name".
Nameless Voice on 28/2/2016 at 15:45
That one's much simpler.
Telliamed on 28/2/2016 at 17:41
Cmon. This is traps&triggers 101.
Put a relay between each object and the RAT. Link a single inverter (with trap control flag NoOff, you don't want the inverter to send TurnOn) to each of the relays. The RAT triggers the inverter.
LarryG on 28/2/2016 at 18:52
Thanks all.
I ended up using the NVLinkBuilder approach as the easiest to implement. It took only two more objects instead of the potentially 8 or more for some solutions, and doesn't need a new custom stim (I already have more than I can remember what they are all for). It works.
Nameless Voice on 29/2/2016 at 02:17
I don't quite get why the stim was mentioned in the first place.
You activate your items via NVRelayTrap set to listen to whatever triggers the system, and linked to the RAT.
You give the NVRelayTrap a custom Off message which sends Turnoff to the RATs.
You use one NVRelayTrap to send the custom off message to all your trigger items (either using their archetype, or metaproperty tagging) - this is the reset command.
That should need no extra objects at all, just your triggers, your single RAT, and one object to trigger the reset.