Difference between revisions of "SetArmorRating - Armor"

From the CreationKit Wiki
Jump to navigation Jump to search
imported>Fg109
imported>Fg109
Line 8: Line 8:
== Syntax ==
== Syntax ==
<source lang="papyrus">
<source lang="papyrus">
float Function SetArmorRating(int armorRating) native
Function SetArmorRating(int armorRating) native
float Function SetAR(int armorRating)
Function SetAR(int armorRating)
</source>
</source>



Revision as of 10:44, 10 May 2012

SKSE Member of: Armor Script

Sets the armor rating of the armor to the specified value.

Syntax

Function SetArmorRating(int armorRating) native
Function SetAR(int armorRating)

Parameters

  • armorRating: The new rating for the armor. Negative values result in semi-random and large values for armor rating.

Return Value

None.

Examples

; Double the armor rating of the player's currently equipped cuirass
Armor BodyArmor = Game.GetPlayer().GetWornForm(0x00000004) as Armor
BodyArmor.SetArmorRating(BodyArmor.GetArmorRating() * 2)


; Set armor rating of Bob's shield to 100
Bob.GetEquippedShield().SetAR(100)

See Also