Jump to content

How can I do material swaps via script?


vizex1

Recommended Posts

All of the blood meshes have a separatley named off bgsm that makes it invisible. For example on the bat, barbwirebloodOFF.bgsm, then chainsbloodOFF.bgsm. Material swapping the specific bloodOFF.bgsm when the player has a specific upgrade via an omod is what is tricky for me. I don't see a simpler way of doing it, unless scripted material swaps might make it easier, which I don't know how to do. I only know how to do scripted omod changes.

Edited by vizex1
Link to comment
Share on other sites

So here's what I've come up with. It compiles but it doesn't seem to do anything.

 	MatSwap Swap1  = Game.GetFormFromFile(0x07006CA0, "Game.esp") as MatSwap
	SetMaterialSwap(Swap1)
	ApplyMaterialSwap(Swap1)

Does anyone know how to script material swaps?

Edited by vizex1
Link to comment
Share on other sites

  • 5 months later...
I would be very interested in knowing this as well. I am working on a mod where I want you to be able to command multiple people who are dancing to change their outfit or parts of the outfit (through a material swap cause itâs one whole piece) rather than though individual dialogue with each. Itâs the equivalent of telling a bunch of girls dancing on the bar to take off their tops (top is a part of the full outfit) or change their boots. Itâs too much to set up as an outfit change cause it will have too many variations. But a general mat swap on the outfits would be much less work if it can be done through script and an activated aid item. Itâs not a major deal but I think it would be a nice âand oneâ to add. Edited by Blutoblutarsky
Link to comment
Share on other sites

  • Recently Browsing   0 members

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