Difference between revisions of "SetModelPath - ArmorAddon"
m
→Examples: added hex notations to first example
imported>Loop not defined (→Notes) |
imported>Loop not defined m (→Examples: added hex notations to first example) |
||
(One intermediate revision by the same user not shown) | |||
Line 22: | Line 22: | ||
<source lang="papyrus"> | <source lang="papyrus"> | ||
; Change all Ebony Armor (cuirass) to appear as Orcish Armor | ; Change all Ebony Armor (cuirass) to appear as Orcish Armor | ||
ArmorAddon orcishCuirassAA = (Game.GetForm( | ArmorAddon orcishCuirassAA = (Game.GetForm(0x00013957) as Armor).GetNthArmorAddon(0) | ||
string FilePath = orcishCuirassAA.GetModelPath(false, false) ; Get Orcish Armor file path | string FilePath = orcishCuirassAA.GetModelPath(false, false) ; Get Orcish Armor file path | ||
ArmorAddon ebonyCuirassAA = (Game.GetForm( | ArmorAddon ebonyCuirassAA = (Game.GetForm(0x00013961) as Armor).GetNthArmorAddon(0) | ||
ebonyCuirassAA.SetModelPath(FilePath, false, false) ; Sets Ebony Armor model path to Orcish Armor .nif file | ebonyCuirassAA.SetModelPath(FilePath, false, false) ; Sets Ebony Armor model path to Orcish Armor .nif file | ||
; NOTE: Only affects male actors in 3rd person view | ; NOTE: Only affects male actors in 3rd person view | ||
Line 51: | Line 51: | ||
*This is to set the nif file of the equipped model on an actor. Use [[SetModelPath - Armor]] to set the nif file of the armor as it appears on the ground. | *This is to set the nif file of the equipped model on an actor. Use [[SetModelPath - Armor]] to set the nif file of the armor as it appears on the ground. | ||
*Remember that this function sets string values for ''ArmorAddon'' objects, not for ''Armor'' objects. You can use [[GetNthArmorAddon - Armor|GetNthArmorAddon]] on Armor objects to quickly retrieve ArmorAddon objects, however. | *Remember that this function sets string values for ''ArmorAddon'' objects, not for ''Armor'' objects. You can use [[GetNthArmorAddon - Armor|GetNthArmorAddon]] on Armor objects to quickly retrieve ArmorAddon objects, however. | ||
*Graphical glitches can result if the target ArmorAddon and the source ArmorAddon do not use the same [[Biped Object]]s. | |||
**Example: Changing IronHelmetAA (Biped: 31 & 43) to use the model path from EbonyHelmetAA (Biped: 30) will result in a bald character wearing no helmet. | |||
== See Also == | == See Also == |