TTLG|Thief|Bioshock|System Shock|Deus Ex|Mobile
Results 1 to 17 of 17

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.

Posting Permissions

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