SetModelPath - Armor

From the CreationKit Wiki
Revision as of 11:16, 10 May 2012 by imported>Fg109
Jump to navigation Jump to search

SKSE Member of: Armor Script, Weapon Script

Sets the file path for the nif file representing the world model of the armor to the specified path. (This function requires SKSE)

Syntax

Function SetModelPath(string path, bool bFemalePath) native

Parameters

  • path: The file path of the nif file, beginning in the Data\Meshes\ folder.
  • bFemalePath: Whether to set the file path of the male or female model of the armor.

Return Value

None.

Examples

; Switch the male and female models of the player's equipped cuirass
Armor BodyArmor = Game.GetPlayer().GetWornForm(0x00000004) as Armor
String FilePath = BodyArmor.GetModelPath(False)
BodyArmor.SetModelPath(BodyArmor.GetModelPath(True), False)
BodyArmor.SetModelPath(FilePath, True)

Notes

  • This is to set the nif file of the world model. That means the model you see when the armor is on the ground, not when it is equipped.

See Also