In general, it only works for numerical and flag type properties, or string properties ending in a number.
What are you trying to set?
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.
In general, it only works for numerical and flag type properties, or string properties ending in a number.
What are you trying to set?
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]")
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).
But within its limitations I have found that it worked great in the uses I have tried.
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"
It sets the value of a (sub-) property directly. It doesn't copy a property from another object or archetype like the receptron does.
So the NVSetPropertyTrapProperty is something like "AnimC". I think I need more than just one line, which isn't possible.
..as used by the Set Property receptron. This description sounds different.The property to modify is specified via the NVSetPropertyTrapProperty. This is the internal name of the property as used by the Set Property receptron (amongst other things).
Okay. Thanks. I'll try something else.
Is there any custom script that can set properties directly? I couldn't find anything.
if it is about rotating try trapmoverelative from the tnh scripts
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]" }
why not just use NVRemovePropertyTrap?
https:/nameless.zanity.net/nvscriptbeta/shock2/NVScript.html#NVRemovePropertyTrap
That wouldn't override the FrobInfo if it was inhereted from a parent archetype or metaproperty.
I quoted the dml, because I wanted to keep the design note.
In this case it's working.
Please tell me how to overwrite inherited FrobInfo.
I meant that using NVRemovePropertyTrap would not overwrite inherited FrobInfo.
I'm surprised your design note works, though.
I'd have thought you'd need to do:
Since there's no "World Action [None]" sub-property. I'm surprised DromEd doesn't throw an error when you try that.Code:NVSetPropertyTrapProperty="FrobInfo"; NVSetPropertyTrapSubProperty="World Action"; NVSetPropertyTrapValue=0
(The FrobInfo actions are flags, so a value of 0 should mean "no flags are set".)
Good, Thanks. I was wondering whether there's
NVSetPropertyTrapPropertyTarget
available.
There's no -Target param, that script is not Targetable. It only applies changes to its own object.
I want to change the shape of a corpse linked object (body parts) on creation. How to do that with NVSetPropertyTrap? I tried to set "model name" as NVSetPropertyTrapProperty/NVSetPropertyTrapSubProperty and the new shape in NVSetPropertyTrapValue, but that didn't work.
I think you'll need to use act/react for that one. Change Object Model receptron.
Already did that (change object model), that works, but it seems it's not enough because there are different zombie types.
I want to "cheat" ZombieRegen script which is adding M-ZombieParts to zombies. I need to add additional zombie part shapes depending on the zombie archetypes.
(Zombie, FreshZombie, Female Zombie).
This should work as gamesys.gam.dml without additional (CreateArch) object creation in the gamesys.
Last edited by Unna Oertdottir; 21st Oct 2019 at 18:25.
You could try using NVSetPropertyTrapPrefix, which will prefix a string in front of the integer property value being set. You can't get rid of the number altogether, though.
it's almost working
NVSetPropertyTrapProperty="ModelName"; NVSetPropertyTrapValue="3b"; NVSetPropertyTrapPrefix=zom
then I get the shape "zom3", a leg (zom3b is a torso)
"b" in "3b" will be ignored
I guess you'd have to copy and rename the model to something like zomb3.
A pain, since that's an original object name.
Is the NVSetPropertyValue treating the "3b" as a numeric value converted to a string variable or literally as a string variable?
It's treating it as a numeric value, so it just trims/ignores the non-numeric characters.