4
Fork 0

Fixed powder barrels not blowing up from hit with a fire arrow

master
Eddoursul 2 years ago
parent 35be623d42
commit 2dc5ae454a
  1. BIN
      Powder barrels explode on hit with flame arrow.esp
  2. BIN
      scripts/_00e_a1_firearrowsc.pex
  3. BIN
      scripts/_00e_explosivebarrelsscript.pex
  4. 3
      source/scripts/_00e_a1_firearrowsc.psc
  5. 22
      source/scripts/_00e_explosivebarrelsscript.psc

Binary file not shown.

@ -20,6 +20,7 @@ Event OnEffectStart(Actor akTarget, Actor akCaster)
amOldAmmo = GetEquippedAmmo() amOldAmmo = GetEquippedAmmo()
akCaster.AddItem(_00E_A1_FireArrowAmm, GetArrowCount()) akCaster.AddItem(_00E_A1_FireArrowAmm, GetArrowCount())
akcaster.EquipItem(_00E_A1_FireArrowAmm) akcaster.EquipItem(_00E_A1_FireArrowAmm)
AddInventoryEventFilter(_00E_A1_FireArrowAmm)
EndEvent EndEvent
@ -49,7 +50,7 @@ Event OnPlayerBowShot(Weapon akWeapon, Ammo akAmmo, float afPower, bool abSunGaz
EndEvent EndEvent
Event OnItemRemoved(Form akBaseItem, int aiItemCount, ObjectReference akItemReference, ObjectReference akDestContainer) Event OnItemRemoved(Form akBaseItem, int aiItemCount, ObjectReference akItemReference, ObjectReference akDestContainer)
If akBaseItem == _00E_A1_FireArrowAmm If akItemReference && ! akDestContainer
akItemReference.Delete() akItemReference.Delete()
EndIf EndIf
EndEvent EndEvent

@ -11,7 +11,24 @@ Import Utility
Event OnHit(ObjectReference akAggressor, Form akSource, Projectile akProjectile, bool abPowerAttack, bool abSneakAttack, bool abBashAttack, bool abHitBlocked) Event OnHit(ObjectReference akAggressor, Form akSource, Projectile akProjectile, bool abPowerAttack, bool abSneakAttack, bool abBashAttack, bool abHitBlocked)
If (akProjectile && _00E_ExplosiveBarrel_ValidProjectiles.HasForm(akProjectile)) || (akSource && _00E_ExplosiveBarrel_ValidSources.HasForm(akSource)) bool bExplode = (akProjectile && _00E_ExplosiveBarrel_ValidProjectiles.HasForm(akProjectile)) || (akSource && _00E_ExplosiveBarrel_ValidSources.HasForm(akSource))
if ! bExplode
Actor aggressor = akAggressor as Actor
if aggressor
if _00E_A1_FireArrowAmm == None
_00E_A1_FireArrowAmm = Game.GetForm(0x670EC) as Ammo
endif
if _00E_A1_FireArrowME == None
_00E_A1_FireArrowME = Game.GetForm(0x5BD36) as MagicEffect
endif
if aggressor.IsEquipped(_00E_A1_FireArrowAmm) || ( aggressor.HasMagicEffect(_00E_A1_FireArrowME) && aggressor.GetItemCount(_00E_A1_FireArrowAmm) == 0 )
bExplode = true
endif
endif
endif
If bExplode
If bExploded == False If bExploded == False
bExploded = True bExploded = True
If ExplosionMarkerRef == None If ExplosionMarkerRef == None
@ -75,3 +92,6 @@ Static Property XMarker Auto
Bool bExploded = False Bool bExploded = False
ObjectReference ExplosionMarkerRef ObjectReference ExplosionMarkerRef
MagicEffect Property _00E_A1_FireArrowME Auto
Ammo Property _00E_A1_FireArrowAmm Auto

Loading…
Cancel
Save