Jump to content

How to set up NIF for PlaceAtNode


niston

Recommended Posts

I'd like to use PlaceAtNode() script function.

 

My understanding is that there needs to be a "node" in the NIF and that node needs to have a name. I can then use PlaceAtNode with the name parameter to spawn an object at the location and with the orientation of said node.

 

Now, what exactly is a "node" in the NIF, within the given context? What needs to be added to the NIF to enable this?

Link to comment
Share on other sites

It works for a nif that contains a REF_ATTACH_NODE (NiNode) like in FloatingPlatformHelper01 or platformhelperfree01. You can add extra nodes by adding NiNodes in nifskope, the node string for PlaceAtNode is the name of the NiNode.

I'm not sure if is just that node name (REF_ATTACH_NODE) that enables that functionality or it's something else.

Link to comment
Share on other sites

Very cool, thanks!

 

Are these, by chance, the same attach nodes as used for lights, yes?

 

Also, I found https://forums.nexusmods.com/index.php?/topic/8103523-is-it-possible-to-conjoin-different-activators-into-a-single-nif/ containing very valuable information.

Since lights are not NIFs, they can't be attached with PlaceAtNode() - normallly.

Of course you can create a NIF with a light and then attach this "light-NIF" to the other nif. This way you can easyly switch on and off the light by enable() / disable() the attached NIF.

If you use the PlaceAtNode() method your NIF should have a NiNode named REF_ATTACH_NODE. Strictly, this does not enable the usage of PlaceAtNode(), but it will make sure that attached NIFs will be moved together with the main NIF in workshop mode.

 

For lights the more standard way is to create an addon in CK (SpecialEffect->AddOnNode) . This can be attached to the NIF via a BSValueNode.

Therefore you need to set Bit 4 of the BSXFlags (Addon). Then add a BSValueNode and fill the entry "Value" with the "Index" of the SpecialEffect->AddOnNode from CK.

This SpecialEffect->AddOnNode must not always be a light, it could also be another effect like smoke. Also, this can be a NIF too! :teehee:

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...