Difference between revisions of "GetModelPath - ArmorAddon"
Jump to navigation
Jump to search
Expanded example
imported>Loop not defined m (→Examples) |
imported>Loop not defined (Expanded example) |
||
Line 21: | Line 21: | ||
<source lang="papyrus"> | <source lang="papyrus"> | ||
; Retrieve the ArmorAddon nif file path for the biped male model of ArmorOrcishCuirass | ; Retrieve the ArmorAddon nif file path for the biped male model of ArmorOrcishCuirass | ||
Armor tempArmor = Game.GetForm( | Armor tempArmor = Game.GetForm(00013957) as Armor | ||
ArmorAddon tempAA = tempArmor.GetNthArmorAddon(0) ; Use "0" to get first ArmorAddon, "1" for second, etc. | ArmorAddon tempAA = tempArmor.GetNthArmorAddon(0) ; Use "0" to get first ArmorAddon, "1" for second, etc. | ||
string FilePath = tempAA.GetModelPath(false, false) | string FilePath = tempAA.GetModelPath(false, false) | ||
; | ; Assigns "Armor\Orcish\cuirassM_1.nif" to FilePath | ||
; Retrieve the ArmorAddon nif file for any armor placed in a container | |||
string mFilePathPOV | |||
string mFilePathBiped | |||
string fFilePathPOV | |||
string fFilePathBiped | |||
Event OnItemAdded(Form akBaseItem, int aiItemCount, ObjectReference akItemReference, ObjectReference akSourceContainer) | |||
if akBaseItem.GetType() == 26 ; If item is Armor | |||
ArmorAddon tempAA = (akBaseItem as Armor).GetNthArmorAddon(0) | |||
mFilePathPOV = tempAA.GetModelPath(true, false) ; 1st person view, male | |||
mFilePathBiped = tempAA.GetModelPath(false, false) ; biped, male | |||
fFilePathPOV = tempAA.GetModelPath(true, true) ; 1st person view, female | |||
fFilePathBiped = tempAA.GetModelPath(false, true) ; biped, female | |||
endif | |||
endEvent | |||
</source> | </source> | ||
== Notes == | == Notes == |