Difference between revisions of "Weapon Script"

From the CreationKit Wiki
Jump to navigation Jump to search
imported>Dienes
imported>CraftySentinel
m (Formatting Change)
Line 21: Line 21:


== Member Functions ==
== Member Functions ==
'''Function [[Fire - Weapon|Fire]](ObjectReference akSource)'''
 
*Fires this weapon from the specified source object.
{|class="wikitable" width =100%
!style="text-align:left;"|Function
!style="text-align:left;"|Description
|-
|[[Fire - Weapon|'''Fire'''(ObjectReference ''akSource'')]]
|Fires this weapon from the specified source object.
|-
 
|}


== SKSE Member Functions ==
== SKSE Member Functions ==
'''int Function [[GetBaseDamage - Weapon|GetBaseDamage]]()'''
*Returns the base damage of this weapon.


'''Function [[SetBaseDamage - Weapon|SetBaseDamage]](int damage)'''
{|class="wikitable" width =100%
*Changes the base damage of this weapon.
!style="text-align:left;"|Function
!style="text-align:left;"|Description
|-
|[[GetBaseDamage - Weapon|Int '''GetBaseDamage'''()]]
|Returns the base damage of this weapon.
|-
 
|[[SetBaseDamage - Weapon|'''SetBaseDamage'''(Int ''damage'')]]
|Changes the base damage of this weapon.
|-
 
|[[GetCritDamage - Weapon|Int '''GetCritDamage'''()]]
|Returns the critical damage of this weapon.
|-


'''int Function [[GetCritDamage - Weapon|GetCritDamage]]()'''
|[[SetCritDamage - Weapon|'''SetCritDamage'''(Int ''damage'')]]
*Returns the critical damage of this weapon.
|Changes the critical damage of this weapon.
|-


'''Function [[SetCritDamage - Weapon|SetCritDamage]](int damage)'''
|[[GetReach - Weapon|Float '''GetReach'''()]]
*Changes the critical damage of this weapon.
|Returns the reach of this weapon.
|-


'''float Function [[GetReach - Weapon|GetReach]]()'''
|[[SetReach - Weapon|'''SetReach'''(Float ''reach'')]]
*Returns the reach of this weapon.
|Changes the reach of this weapon.
|-


'''Function [[SetReach - Weapon|SetReach]](float reach)'''
|[[GetMinRange - Weapon|Float '''GetMinRange'''()]]
*Changes the reach of this weapon.
|Returns the minimum range of this weapon.
|-


'''float Function [[GetMinRange - Weapon|GetMinRange]]()'''
|[[SetMinRange - Weapon|'''SetMinRange'''(Float ''minRange'')]]
*Returns the minimum range of this weapon.
|Changes the minimum range of this weapon.
|-


'''Function [[SetMinRange - Weapon|SetMinRange]](float minRange)'''
|[[GetMaxRange - Weapon|Float '''GetMaxRange'''()]]
*Changes the minimum range of this weapon.
|Returns the maximum range of this weapon.
|-


'''float Function [[GetMaxRange - Weapon|GetMaxRange]]()'''
|[[SetMaxRange - Weapon|'''SetMaxRange'''(Float ''maxRange'')]]
*Returns the maximum range of this weapon.
|Changes the maximum range of this weapon.
|-


'''Function [[SetMaxRange - Weapon|SetMaxRange]](float maxRange)'''
|[[GetSpeed - Weapon|Float '''GetSpeed'''()]]
*Changes the maximum range of this weapon.
|Returns the speed of this weapon.
|-


'''float Function [[GetSpeed - Weapon|GetSpeed]]()'''
|[[SetSpeed - Weapon|'''SetSpeed'''(Float ''speed'')]]
*Returns the speed of this weapon.
|Changes the speed of this weapon.
|-


'''Function [[SetSpeed - Weapon|SetSpeed]](float speed)'''
|[[GetStagger - Weapon|Float '''GetStagger'''()]]
*Changes the speed of this weapon.
|Returns the stagger value of this weapon.
|-


'''float Function [[GetStagger - Weapon|GetStagger]]()'''
|[[SetStagger - Weapon|'''SetStagger'''(Float ''stagger'')]]
*Returns the stagger value of this weapon.
|Changes the stagger value of this weapon.
|-


'''Function [[SetStagger - Weapon|SetStagger]](float stagger)'''
|[[GetWeaponType - Weapon|Int '''GetWeaponType'''()]]
*Changes the stagger value of this weapon.
|Returns the weapon type of this weapon.
|-


'''int Function [[GetWeaponType - Weapon|GetWeaponType]]()'''
|[[SetWeaponType - Weapon|'''SetWeaponType'''(Int ''type'')]]
*Returns the weapon type of this weapon.
|Changes the weapon type of this weapon.
|-


'''Function [[SetWeaponType - Weapon|SetWeaponType]](int type)'''
|[[GetModelPath - Weapon|String '''GetModelPath'''()]]
*Changes the weapon type of this weapon.
|Returns the path to the file representing the in-game model of this weapon.
|-


'''string Function [[GetModelPath - Weapon|GetModelPath]]()'''
|[[SetModelPath - Weapon|'''SetModelPath'''(String ''path'')]]
*Returns the path to the file representing the in-game model of this weapon.
|Changes the path to the file representing the in-game model of this weapon.
|-


'''Function [[SetModelPath - Weapon|SetModelPath]](string path)'''
|[[GetIconPath - Weapon|String '''GetIconPath'''()]]
*Changes the path to the file representing the in-game model of this weapon.
|Returns the path to the file representing the icon of this weapon in the inventory.
|-


'''string Function [[GetIconPath - Weapon|GetIconPath]]()'''
|[[SetIconPath - Weapon|'''SetIconPath'''(String ''path'')]]
*Returns the path to the file representing the icon of this weapon in the inventory.
|Changes the path to the file representing the icon of this weapon in the inventory.
|-


'''Function [[SetIconPath - Weapon|SetIconPath]](string path)'''
|[[GetMessageIconPath - Weapon|String '''GetMessageIconPath'''()]]
*Changes the path to the file representing the icon of this weapon in the inventory.
|Returns the path to the file representing the message icon for this weapon.
|-


'''string Function [[GetMessageIconPath - Weapon|GetMessageIconPath]]()'''
|[[SetMessageIconPath - Weapon|'''SetMessageIconPath'''(String ''path'')]]
*Returns the path to the file representing the message icon for this weapon.
|Changes the path to the file representing the message icon for this weapon.
|-


'''Function [[SetMessageIconPath - Weapon|SetMessageIconPath]](string path)'''
|[[IsBattleAxe - Weapon|Bool '''IsBattleAxe'''()]]
*Changes the path to the file representing the message icon for this weapon.
|Returns whether this weapon has the "WeapTypeBattleaxe" keyword.
|-


'''bool Function [[IsBattleAxe - Weapon|IsBattleaxe]]()'''
|[[IsBow - Weapon|Bool '''IsBow'''()]]
*Returns whether this weapon has the "WeapTypeBattleaxe" keyword.
|Returns whether this weapon has the "WeapTypeBow" keyword.
|-


'''bool Function [[IsBow - Weapon|IsBow]]()'''
|[[IsDagger - Weapon|Bool '''IsDagger'''()]]
*Returns whether this weapon has the "WeapTypeBow" keyword.
|Returns whether this weapon has the "WeapTypeDagger" keyword.
|-


'''bool Function [[IsDagger - Weapon|IsDagger]]()'''
|[[IsGreatsword - Weapon|Bool '''IsGreatsword'''()]]
*Returns whether this weapon has the "WeapTypeDagger" keyword.
|Returns whether this weapon has the "WeapTypeGreatsword" keyword.
|-


'''bool Function [[IsGreatsword - Weapon|IsGreatsword]]()'''
|[[IsMace - Weapon|Bool '''IsMace'''()]]
*Returns whether this weapon has the "WeapTypeGreatsword" keyword.
|Returns whether this weapon has the "WeapTypeMace" keyword.
|-


'''bool Function [[IsMace - Weapon|IsMace]]()'''
|[[IsStaff - Weapon|Bool '''IsStaff'''()]]
*Returns whether this weapon has the "WeapTypeMace" keyword.
|Returns whether this weapon has the "WeapTypeStaff" keyword.
|-


'''bool Function [[IsStaff - Weapon|IsStaff]]()'''
|[[IsSword - Weapon|Bool '''IsSword'''()]]
*Returns whether this weapon has the "WeapTypeStaff" keyword.
|Returns whether this weapon has the "WeapTypeSword" keyword.
|-


'''bool Function [[IsSword - Weapon|IsSword]]()'''
|[[IsWarhammer - Weapon|Bool '''IsWarhammer'''()]]
*Returns whether this weapon has the "WeapTypeSword" keyword.
|Returns whether this weapon has the "WeapTypeWarhammer" keyword.
|-


'''bool Function [[IsWarhammer - Weapon|IsWarhammer]]()'''
|[[IsWarAxe - Weapon|Bool '''IsWarAxe'''()]]
*Returns whether this weapon has the "WeapTypeWarhammer" keyword.
|Returns whether this weapon has the "WeapTypeWarAxe" keyword.
|-


'''bool Function [[IsWarAxe - Weapon|IsWarAxe]]()'''
|[[GetEnchantment - Weapon|Enchantment '''GetEnchantment'''()]]
*Returns whether this weapon has the "WeapTypeWarAxe" keyword.
|Returns the Enchantment associated with the weapon
|-


'''Enchantment Function [[GetEnchantment - Weapon|GetEnchantment]]()'''
|[[SetEnchantment - Weapon|'''SetEnchantment'''(Enchantment ''e'')]]
*Returns the Enchantment associated with the weapon
|Set the Enchantment associated with the weapon
|-


'''Function [[SetEnchantment - Weapon|SetEnchantment]](Enchantment e)'''
|}
*Set the Enchantment associated with the weapon


== Events ==
== Events ==
None
None

Revision as of 05:43, 24 October 2013


Extends: Form Script

Script for the manipulation of weapon base objects.

Definition

ScriptName Weapon extends Form

Properties

None

Global Functions

None

Member Functions

Function Description
Fire(ObjectReference akSource) Fires this weapon from the specified source object.

SKSE Member Functions

Function Description
Int GetBaseDamage() Returns the base damage of this weapon.
SetBaseDamage(Int damage) Changes the base damage of this weapon.
Int GetCritDamage() Returns the critical damage of this weapon.
SetCritDamage(Int damage) Changes the critical damage of this weapon.
Float GetReach() Returns the reach of this weapon.
SetReach(Float reach) Changes the reach of this weapon.
Float GetMinRange() Returns the minimum range of this weapon.
SetMinRange(Float minRange) Changes the minimum range of this weapon.
Float GetMaxRange() Returns the maximum range of this weapon.
SetMaxRange(Float maxRange) Changes the maximum range of this weapon.
Float GetSpeed() Returns the speed of this weapon.
SetSpeed(Float speed) Changes the speed of this weapon.
Float GetStagger() Returns the stagger value of this weapon.
SetStagger(Float stagger) Changes the stagger value of this weapon.
Int GetWeaponType() Returns the weapon type of this weapon.
SetWeaponType(Int type) Changes the weapon type of this weapon.
String GetModelPath() Returns the path to the file representing the in-game model of this weapon.
SetModelPath(String path) Changes the path to the file representing the in-game model of this weapon.
String GetIconPath() Returns the path to the file representing the icon of this weapon in the inventory.
SetIconPath(String path) Changes the path to the file representing the icon of this weapon in the inventory.
String GetMessageIconPath() Returns the path to the file representing the message icon for this weapon.
SetMessageIconPath(String path) Changes the path to the file representing the message icon for this weapon.
Bool IsBattleAxe() Returns whether this weapon has the "WeapTypeBattleaxe" keyword.
Bool IsBow() Returns whether this weapon has the "WeapTypeBow" keyword.
Bool IsDagger() Returns whether this weapon has the "WeapTypeDagger" keyword.
Bool IsGreatsword() Returns whether this weapon has the "WeapTypeGreatsword" keyword.
Bool IsMace() Returns whether this weapon has the "WeapTypeMace" keyword.
Bool IsStaff() Returns whether this weapon has the "WeapTypeStaff" keyword.
Bool IsSword() Returns whether this weapon has the "WeapTypeSword" keyword.
Bool IsWarhammer() Returns whether this weapon has the "WeapTypeWarhammer" keyword.
Bool IsWarAxe() Returns whether this weapon has the "WeapTypeWarAxe" keyword.
Enchantment GetEnchantment() Returns the Enchantment associated with the weapon
SetEnchantment(Enchantment e) Set the Enchantment associated with the weapon

Events

None