Jump to content

Need help with script


vizex1

Recommended Posts

I have this in an event in my script:

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

It works, but it seems to be applying the swap to everything.

So I tried to do this:

Armor Property Arm Auto Const

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

but I get the error 'ApplyMaterialSwap is not a function or does not exist'.

Anyone know how to do this?

In this: https://www.creationkit.com/fallout4/index.php?title=SetMaterialSwap_-_ObjectReference

The guy wrote pretty much the same thing. He wrote this:

weaponReference.SetMaterialSwap(myMaterialSwap)

Is there something I'm not understanding? Help!

Edited by vizex1
Link to comment
Share on other sites

Actually maybe this is not the problem.

I have the same script attached to two different armors. The properties are different though.

If both pieces of armor are equipped at the same time,

It seems that when the script makes something happen with the first armor the same thing happens with the second armor Even though the properties for the conditions are the different.???

 

Nvmnd, after reviewing my script i think the material swap IS the problem.

Edited by vizex1
Link to comment
Share on other sites

Well, I came up with an idea for a workaround. I'll just have to create a seperate set of BGSMs for the second armor meshes which had identical bgsms. Then I'll created a second set of MSWPs which refer to the new Bgsms. Then I'll just copy the script and make a version2script, and attach that copy to the second armor and rename the material swaps in the 2nd script to refer to the new bgsms.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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