LarryG on 9/11/2014 at 04:05
I'm having a problem with the NVSafeDoor script. According to the documentation you can use a specified qvar for the safe combo:
Quote:
The combination is read from the mission-scope quest variable <cite>NVSafeDoor</cite> (you can specify a different variable via the <kbd>NVSafeQVar</kbd> parameter.)
If I put the combo in a <cite>NVSafeDoor</cite>, the safe opens just fine, but if I put the combo in another qvar (
SomeOtherQvar) and add the design note
Quote:
NVSafeQVar="$SomeOtherQvar"
it does not.
Has anyone had success using a different qvar for the combo? Or is that part of the script known to be broken? I know I can copy the qvar value from
SomeOtherQvar to
NVSafeDoor, and if the documentation didn't say I could use any qvar I wanted, that's what I would have done.
Oh, also the script seems to have another
bugfeature in that the combo 0000 does not work. 1111 will work as will any other repeated integer value. I suspect this is because the number of places in the combination is determined by the position of the first non-zero digit, left to right. A parameter for specifying the number of positions in the combo could have allowed for leading zeros in a combination. Oh well.
LarryG on 10/11/2014 at 06:17
I heard from NV, and yes, the
NVSafeQVar parameter was broken in NVScripts. He fixed it today. The new osm has today's date (11/09/2014). Per NV,
Quote:
No, you don't use the dollar sign in this case. The param is a string parameter specifying the name of the quest variable, it is not an integer value that should be read
from a quest variable.
So you specify the qvar by
NVSafeQVar="SomeOtherQvar".
Nameless Voice on 12/11/2014 at 01:42
To clarify the documentation regarding quest variables:
Quote:
When a script looks for an integer or flag parameter, you can have it read a quest variable and use its value in place of the parameter. After the equals sign, type a dollar sign ($) and the name of the quest variable (there may not be space between the dollar sign and the variable name. )
For example, if you wanted to have an NVRelayTrap which fired a number of times based on the number entered into a combination lock/odometer combo using the
combo quest variable, you could specify
NVRelayTrapRepeat=$comboNote that if you want to supply the name of quest variable as a script parameter, rather than use the current value of the quest variable, then the dollar sign should not be used.
LarryG on 13/11/2014 at 00:35
I'm now having trouble with combining NVRelayTrap with NVSafeDoor. I want to relay based on the "DoorOpen" and "DoorClose" messages, but nothing ever gets sent. I've put NVSpy on both the safe door and the switch I want to disable/enable based on whether the safe door is open or closed. Nothing gets sent. It is as though the NVRelayTrap wasn't on the door. I've tried changing the order of the scripts so that StdDoor was 1st, NVSafeDoor was 2nd, and NVRelayTrap was 3rd. But that had no effect.
SecretSafeDoor:
Editor Design Note: NVSafeQVar="SafeCombo"; NVRelayTrapOn="DoorOpen"; NVRelayTrapOff="DoorClose", NVRelayTrapTOn="Deactivate"; NVRelayTrapTOff="Activate", NVRelayTrapTDest="SecretSafeSwitch";
Scripts: NVRelayTrap, StdDoor; NVSafeDoor; NVSpy
SecretSafeSwitch:
Editor Design Note: NVMetaTrapMeta="FrobInert"; NVMetaTrapOn="Deactivate"; NVMetaTrapOff="Activate"
Scripts: NVMetaTrap; NVSpy
NVSpy reports
NVSpy: "DoorOpen" on SecretSafeDoor (582) from (0)
after opening it, and
NVSpy: "DoorClose" on SecretSafeDoor (582) from (0)
after closing it, but nothing gets reported from SecretSafeSwitch. I've tried using a had CD link to SecretSafeSwitch, and that gets me a report of a TurnOn when the safe opens, and nothing when it closes. But that tells me that SecretSafeSwitch is receiving and reporting messages. It just seems that the NVRelay on SecretSafeDoor isn't working.
Anyone have any ideas, or should I simply assume that NVSafeDoor is not compatible with NVRelayTrap. That would suck.
Nameless Voice on 13/11/2014 at 02:04
Odd.
There's no reason why it shouldn't work. I tried NVRelayTrap on the door, and it passed messages along to a named-object destination just fine.
You have some commas in your design note where there should be semicolons!
Why do you need to make the lever FrobInert? I assume it's inside the safe? Why not just put the Inventory->Block Frob? property on the door?
LarryG on 13/11/2014 at 02:28
Ah. You don't know how long I have been beating my head against the wall on this. That solves it. I've got to start writing the design notes in notepad and copy them over. The font on the design note is just too small for my eyes. Thank you.
As to why, well, the switch controls a panel which slides out of the way of the safe, allowing the door to be seen and opened. If the door is left open and the switch re-thrown, the panel would slide through the safe door. Not good. So this setup prevents closing the panel with the door open. If you close the safe, then the switch works again.
Nameless Voice on 13/11/2014 at 16:34
That does make sense - I hadn't quite noticed that the FrobInert was being set when the door was open, rather than when it was closed.