Editing
GetModelPath - ArmorAddon
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
[[Category:Scripting]] [[Category:Papyrus]] [[Category:SKSE]] '''SKSE Member of:''' [[ArmorAddon Script]] Returns the file path for the nif file representing the equipped model of the armor. (This function requires SKSE) == Syntax == <syntaxhighlight lang="papyrus"> string Function GetModelPath(bool firstPerson, bool female) native </syntaxhighlight> == Parameters == *firstPerson: Whether to get the file path of the biped armor model (false) or first person armor model (true). "True" only applicable to certain armor types. *female: Whether to get the file path of the male armor model (false) or female armor model (true). == Return Value == A string representing the file path of the nif file from the Data\Meshes folder. == Examples == <syntaxhighlight lang="papyrus"> ; Retrieve the ArmorAddon nif file path for the biped male model of ArmorOrcishCuirass Armor orcishCuirass = Game.GetForm(00013957) as Armor ArmorAddon orcishCuirassAA = orcishCuirass.GetNthArmorAddon(0) ; 0 = first, 1 = second, etc. Return orcishCuirassAA.GetModelPath(false, false) ; Returns the string "Armor\Orcish\cuirassM_1.nif" ; 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) ; 0 = first, 1 = second, etc. 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 </syntaxhighlight> == Notes == *This is to retrieve the nif file of the equipped model on an actor. Use [[GetModelPath - Armor]] to retrieve the nif file of the armor as it appears on the ground. *Remember that this function returns string values from ''ArmorAddon'' objects, not from ''Armor'' objects. You can use [[GetNthArmorAddon - Armor|GetNthArmorAddon]] on Armor objects to quickly retrieve ArmorAddon objects, however. == See Also == *[[ArmorAddon Script]] *[[SetModelPath - ArmorAddon]] *[[GetNthArmorAddon - Armor]]
Summary:
Please note that all contributions to the CreationKit Wiki are considered to be released under the Creative Commons Attribution-ShareAlike (see
CreationKit:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
Edit source
View history
More
Search
Navigation
Landing page
Tutorials
Game Systems
Editor Reference
Scripting Reference
Recent changes
Help
Tools
What links here
Related changes
Special pages
Page information
Page values