TTLG|Thief|Bioshock|System Shock|Deus Ex|Mobile
Page 1 of 2 12 LastLast
Results 1 to 25 of 27

Thread: Set Property in NVSetPropertyTrap

  1. #1
    Dˇttirin klŠ­ist oft mˇ­ur m÷ttli
    Registered: Apr 2015

    Set Property in NVSetPropertyTrap

    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.

  2. #2
    Member
    Registered: Mar 2001
    Location: Ireland
    In general, it only works for numerical and flag type properties, or string properties ending in a number.
    What are you trying to set?

  3. #3
    Member
    Registered: Jan 2001
    Location: Formby, NW England
    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]")

  4. #4
    Member
    Registered: Mar 2001
    Location: Ireland
    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).

  5. #5
    Member
    Registered: Aug 2007
    Location: LosAngeles: Between Amusements
    But within its limitations I have found that it worked great in the uses I have tried.

  6. #6
    Dˇttirin klŠ­ist oft mˇ­ur m÷ttli
    Registered: Apr 2015
    Quote Originally Posted by Nameless Voice View Post
    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"

  7. #7
    Member
    Registered: Mar 2001
    Location: Ireland
    It sets the value of a (sub-) property directly. It doesn't copy a property from another object or archetype like the receptron does.

  8. #8
    Dˇttirin klŠ­ist oft mˇ­ur m÷ttli
    Registered: Apr 2015
    So the NVSetPropertyTrapProperty is something like "AnimC". I think I need more than just one line, which isn't possible.

    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).
    ..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.

  9. #9
    Member
    Registered: Aug 2004
    Location: netherlands
    if it is about rotating try trapmoverelative from the tnh scripts

  10. #10
    Dˇttirin klŠ­ist oft mˇ­ur m÷ttli
    Registered: Apr 2015
    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]"
        
    }

  11. #11
    Zombified
    Registered: Sep 2004
    why not just use NVRemovePropertyTrap?

    https:/nameless.zanity.net/nvscriptbeta/shock2/NVScript.html#NVRemovePropertyTrap

  12. #12
    Member
    Registered: Mar 2001
    Location: Ireland
    That wouldn't override the FrobInfo if it was inhereted from a parent archetype or metaproperty.

  13. #13
    Dˇttirin klŠ­ist oft mˇ­ur m÷ttli
    Registered: Apr 2015
    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.

  14. #14
    Member
    Registered: Mar 2001
    Location: Ireland
    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:
    Code:
    NVSetPropertyTrapProperty="FrobInfo"; NVSetPropertyTrapSubProperty="World Action"; NVSetPropertyTrapValue=0
    Since there's no "World Action [None]" sub-property. I'm surprised DromEd doesn't throw an error when you try that.

    (The FrobInfo actions are flags, so a value of 0 should mean "no flags are set".)

  15. #15
    Dˇttirin klŠ­ist oft mˇ­ur m÷ttli
    Registered: Apr 2015
    Good, Thanks. I was wondering whether there's
    NVSetPropertyTrapPropertyTarget

    available.

  16. #16
    Zombified
    Registered: Sep 2004
    Quote Originally Posted by Nameless Voice View Post
    That wouldn't override the FrobInfo if it was inhereted from a parent archetype or metaproperty.
    ah, I misread the post a bit, thought just removing the prop from a concrete was the intention.

  17. #17
    Member
    Registered: Mar 2001
    Location: Ireland
    There's no -Target param, that script is not Targetable. It only applies changes to its own object.

  18. #18
    Dˇttirin klŠ­ist oft mˇ­ur m÷ttli
    Registered: Apr 2015
    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.

  19. #19
    Member
    Registered: Mar 2001
    Location: Ireland
    I think you'll need to use act/react for that one. Change Object Model receptron.

  20. #20
    Dˇttirin klŠ­ist oft mˇ­ur m÷ttli
    Registered: Apr 2015
    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.

  21. #21
    Member
    Registered: Mar 2001
    Location: Ireland
    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.

  22. #22
    Dˇttirin klŠ­ist oft mˇ­ur m÷ttli
    Registered: Apr 2015
    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

  23. #23
    Member
    Registered: Mar 2001
    Location: Ireland
    I guess you'd have to copy and rename the model to something like zomb3.

    A pain, since that's an original object name.

  24. #24
    Member
    Registered: May 2002
    Location: Texas
    Is the NVSetPropertyValue treating the "3b" as a numeric value converted to a string variable or literally as a string variable?

  25. #25
    Member
    Registered: Mar 2001
    Location: Ireland
    It's treating it as a numeric value, so it just trims/ignores the non-numeric characters.

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •