Unna Oertdottir on 24/10/2016 at 19:11
Is it possible to set and remove a property with NVSetPropertyTrap? How does it work?
I know how to set it with S&R but this isn't possible this time.
Nameless Voice on 24/10/2016 at 19:55
In general, it only works for numerical and flag type properties, or string properties ending in a number.
What are you trying to set?
R Soul on 24/10/2016 at 20:02
I haven't tried it myself, but from the documentation it looks like it only modifies existing properties. It also says "This script has only been minimally tested."
You may not be able to use S&R in the usual way, but NV's scripts can send stims, so Receptrons will work.
E.g. NVRelayTrap:
Design Note: NVRelayTrapTOn="[5.00]HolyStim"; NVRelayTrapTDest="object name here"
(the second parameter is optional: you can use a CD link instead, or NVRelayTrapTDest="[me]")
Nameless Voice on 24/10/2016 at 20:06
That's not quite how Dark works - there's only "set property". If you set a property that doesn't exist, it will be added.
(In other words, yes, it can modify or add properties.)
A bigger flaw is that it can only set one property (or one subproperty).
LarryG on 24/10/2016 at 21:00
But within its limitations I have found that it worked great in the uses I have tried.
Unna Oertdottir on 25/10/2016 at 12:37
Quote Posted by Nameless Voice
What are you trying to set?
I'm trying to set a custom property. A simple tweq--rotate property, let's name it "CustomRotate" (it's working fine with S&R)
Now I'm confused. Can I set a property or not?
I tried this
NVSetPropertyTrapProperty="cfgtweqrotate";NVSetPropertyTrapProperty="CustomRotate"
Nameless Voice on 25/10/2016 at 13:36
It sets the value of a (sub-) property directly. It doesn't copy a property from another object or archetype like the receptron does.
Unna Oertdottir on 25/10/2016 at 14:22
So the NVSetPropertyTrapProperty is something like "AnimC". I think I need more than just one line, which isn't possible.
Quote:
The property to modify is specified via the <kbd>NVSetPropertyTrapProperty</kbd>. This is the internal name of the property as used by the Set Property receptron (amongst other things).
..as used by the Set Property receptron. This description sounds different.
Okay. Thanks. I'll try something else.
Is there any custom script that can set properties directly? I couldn't find anything.
nightshifter on 25/10/2016 at 16:50
if it is about rotating try trapmoverelative from the tnh scripts
Unna Oertdottir on 30/9/2019 at 13:06
Need to put this somewhere, so I can find it again.
(this will remove any world frobinfo)
Code:
+ObjProp xxx "Scripts"
{
"Script 0" NVSetPropertyTrap
}
+ObjProp xxx "DesignNote"
{
"" NVSetPropertyTrapProperty="FrobInfo";NVSetPropertyTrapSubProperty="World Action [None]"
}