Difference between revisions of "SetMaterialSwap - ObjectReference"

added details
imported>Qazaaq
imported>Qazaaq
(added details)
Line 2: Line 2:
{{Template:Papyrus:RequiredF4SE|version=0.6.7}}
{{Template:Papyrus:RequiredF4SE|version=0.6.7}}


Sets the [[Material Swap]] for this reference.
Sets the internal persistent [[Material Swap]] for this reference.
 
This function does not apply a visual update, you must use [[ApplyMaterialSwap - ObjectReference|ApplyMaterialSwap]].
This will make the game take care of setting the material swap when the game is loaded.
[[ApplyMaterialSwap - ObjectReference|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 - ObjectReference|ApplyMaterialSwap]] function.
Behavior may not be as expected when applied to living references, [[Weapon]]s, or [[Armor]] placed in the world.


== Syntax ==
== Syntax ==
Line 10: Line 15:


== Parameters ==
== Parameters ==
*mSwap: The [[Material Swap]] applied to this reference.
*mSwap: The [[Material Swap]] added to this reference.  
**Adding persistent material swaps will increase save-size by a small amount. Setting this to <code>None</code> will remove persistence and free up save-space.
 
== Return Value ==
== Return Value ==
None
None
Line 18: Line 24:
<source lang="papyrus">
<source lang="papyrus">
weaponReference.SetMaterialSwap(myMaterialSwap)
weaponReference.SetMaterialSwap(myMaterialSwap)
Debug.Trace("Set the material swap to "+myMaterialSwap+" on the "+weaponReference+" reference.")
</source>
</source>


Line 23: Line 30:
*[[Material Swap]]
*[[Material Swap]]
*[[MatSwap Script]]
*[[MatSwap Script]]
*[[ApplyMaterialSwap - ObjectReference]]
*[[GetMaterialSwap - ObjectReference]]
*[[ObjectReference Script]]
*[[ObjectReference Script]]


Anonymous user