SetMaxRange - Weapon

From the CreationKit Wiki
Jump to navigation Jump to search

SKSE Member of: Weapon Script

Changes the maximum range of this weapon. (This function requires SKSE)

Syntax[edit | edit source]

Function SetMaxRange(float maxRange) native

Parameters[edit | edit source]

  • maxRange: The new maximum range of this weapon.

Return Value[edit | edit source]

None.

Examples[edit | edit source]

; Double the maximum range of the player's right hand weapon
Weapon PlayerWeapon = Game.GetPlayer().GetEquippedWeapon()
PlayerWeapon.SetMaxRange(PlayerWeapon.GetMaxRange() * 2.0)

See Also[edit | edit source]