DamageTypeInfo Struct - InstanceData

From the Fallout4 CreationKit Wiki
Jump to navigation Jump to search

F4SE Member of: InstanceData Script
Requires F4SE version 0.3.1 or higher.

A structure that holds information on an a Damage Type from an object.

Syntax[edit | edit source]

Struct DamageTypeInfo
  Form Type
  int Damage
EndStruct

Members[edit | edit source]

  • Type: A Damage Type.
  • Damage: The value of the Type on the item.

Examples[edit | edit source]

; Getting DamageTypeInfo from a LaserGun
InstanceData:Owner thisInstance = new InstanceData:Owner
thisInstance.Owner = self as ObjectReference

InstanceData:DamageTypeInfo[] DamageTypes = GetDamageTypes(thisInstance)
Debug.Trace(DamageTypes[0].Type)    ; dtEnergy
Debug.Trace(DamageTypes[0].Damage)  ; 24

See Also[edit | edit source]