Difference between revisions of "SetArmorRating - Armor"
Jump to navigation
Jump to search
imported>Fg109 (Created page for SetArmorRating) |
imported>Rasikko m (Only makes change to the base armor rating.) |
||
(4 intermediate revisions by one other user not shown) | |||
Line 4: | Line 4: | ||
'''SKSE Member of:''' [[Armor Script]] | '''SKSE Member of:''' [[Armor Script]] | ||
Sets the armor rating of the armor to the specified value. | Sets the armor rating of the armor to the specified value. (This function requires SKSE) | ||
== Syntax == | == Syntax == | ||
<source lang="papyrus"> | <source lang="papyrus"> | ||
Function SetArmorRating(int armorRating) native | |||
Function SetAR(int armorRating) | |||
</source> | </source> | ||
== Parameters == | == Parameters == | ||
*armorRating: The new rating for the armor. | *armorRating: The new rating for the armor. Negative values result in semi-random and large values for armor rating. | ||
== Return Value == | == Return Value == | ||
Line 29: | Line 29: | ||
Bob.GetEquippedShield().SetAR(100) | Bob.GetEquippedShield().SetAR(100) | ||
</source> | </source> | ||
== Notes == | |||
* Changes the base armor rating. | |||
== See Also == | == See Also == | ||
Line 34: | Line 37: | ||
*[[GetArmorRating - Armor]] | *[[GetArmorRating - Armor]] | ||
*[[ModArmorRating - Armor]] | *[[ModArmorRating - Armor]] | ||
Latest revision as of 14:09, 8 May 2018
SKSE Member of: Armor Script
Sets the armor rating of the armor to the specified value. (This function requires SKSE)
Syntax[edit | edit source]
Function SetArmorRating(int armorRating) native
Function SetAR(int armorRating)
Parameters[edit | edit source]
- armorRating: The new rating for the armor. Negative values result in semi-random and large values for armor rating.
Return Value[edit | edit source]
None.
Examples[edit | edit source]
; 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)
Notes[edit | edit source]
- Changes the base armor rating.