SetMaterialSwap - ObjectReference

Revision as of 02:07, 5 April 2018 by imported>Qazaaq (Scrivener07 moved page SetMaterialSwap - ObjectReference (F4SE) to SetMaterialSwap - ObjectReference over redirect)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

F4SE Member of: ObjectReference Script
Requires F4SE version 0.6.7 or higher.

Sets the internal persistent Material Swap for this reference.

This function does not apply a visual update, you must use ApplyMaterialSwap. This will make the game take care of setting the material swap when the game is loaded. ApplyMaterialSwap is a more greedy method of applying materials so the nif objects the game applies materials to may not match up with the ApplyMaterialSwap function. Behavior may not be as expected when applied to living references, Weapons, or Armor placed in the world.

SyntaxEdit

Function SetMaterialSwap(MatSwap mSwap) Native

ParametersEdit

  • mSwap: The Material Swap added to this reference.
    • Adding persistent material swaps will increase save-size by a small amount. Setting this to None will remove persistence and free up save-space.

Return ValueEdit

None

ExamplesEdit

weaponReference.SetMaterialSwap(myMaterialSwap)
Debug.Trace("Set the material swap to "+myMaterialSwap+" on the "+weaponReference+" reference.")

See AlsoEdit