Cleaned up TrapExplosiveGas
This commit is contained in:
parent
8c999a6fd6
commit
2db96586c2
Binary file not shown.
@ -1,7 +1,4 @@
|
||||
scriptName TrapExplosiveGas extends objectReference
|
||||
;
|
||||
;
|
||||
;==================================================
|
||||
|
||||
formlist property flExplodesGasTrapOnHit auto
|
||||
{projectiles that will set this off when they hit}
|
||||
@ -18,7 +15,6 @@ formlist property flExplodesGasTrapEquippedSpell auto
|
||||
formlist property trapGasWeapon auto
|
||||
{weapons that will set this off on hit, specifically explosions}
|
||||
|
||||
bool actorHasWeaponsDrawn = TRUE ;remove this later
|
||||
bool property checkActorEquippedItems = TRUE auto
|
||||
{Whether or not to check items the player is carrying
|
||||
default = True on explosive gas
|
||||
@ -32,11 +28,10 @@ keyword property flameKeyword Auto
|
||||
keyword property lightningKeyword auto
|
||||
bool property lightningIgnites = TRUE Auto
|
||||
{if this is true lightning should ignite this trap
|
||||
default == false}
|
||||
default == true}
|
||||
|
||||
light property Torch01 auto
|
||||
projectile property storedProjectile auto hidden
|
||||
objectReference property storedObjRef auto hidden
|
||||
MagicEffect property storedEffect1 auto hidden
|
||||
MagicEffect property storedEffect2 auto hidden
|
||||
MagicEffect property storedEffect3 auto hidden
|
||||
@ -48,17 +43,13 @@ auto state waiting
|
||||
event onHit(objectReference akAggressor, form akWeapon, projectile akProjectile, bool abPowerAttack, bool abSneakAttack, bool abBashAttack, bool abHitBlocked)
|
||||
if !akProjectile || akProjectile != storedProjectile
|
||||
storedProjectile = akProjectile
|
||||
; debug.Trace(self + " is testing " + akProjectile + " due to onHit, akWeapon = " + akWeapon)
|
||||
|
||||
;USKP 1.3.2 added NONE checks due to numerous Papyrus errors.
|
||||
If( (trapGasWeapon != NONE && trapGasWeapon.hasForm(akWeapon)) || akweapon == torch01 )
|
||||
; debug.Trace(self + " is exploding due to " + akWeapon + " being in formlist " + TrapGasWeapon)
|
||||
GasExplode(akAggressor)
|
||||
ElseIf( flExplodesGasTrapOnHit != NONE && flExplodesGasTrapOnHit.hasForm(akProjectile) )
|
||||
; debug.Trace(self + " is exploding due to " + akProjectile)
|
||||
GasExplode(akAggressor)
|
||||
ElseIf akWeapon.HasKeyword(flameKeyword) || ( lightningIgnites && akWeapon.HasKeyword(lightningKeyword) )
|
||||
; debug.Trace(self + " is exploding due to " + akWeapon + " - hasKeyword")
|
||||
GasExplode(akAggressor)
|
||||
endif
|
||||
endif
|
||||
@ -81,15 +72,11 @@ auto state waiting
|
||||
storedEffect4 = akEffect
|
||||
storedEffectIncrement = 1
|
||||
endif
|
||||
; debug.Trace(self + " is testing " + akEffect + " due to onMagicEffectApply")
|
||||
if flExplodesGasTrapOnMagicEffectApply.hasForm(akEffect as form)
|
||||
; debug.Trace(self + " is exploding due to " + akEffect)
|
||||
GasExplode(akCaster)
|
||||
elseif akEffect.hasKeyword(flameKeyword)
|
||||
; debug.Trace(self + " is exploding due to " + akEffect)
|
||||
GasExplode(akCaster)
|
||||
elseif lightningIgnites && akEffect.hasKeyword(lightningKeyword)
|
||||
; debug.Trace(self + " is exploding due to " + akEffect)
|
||||
GasExplode(akCaster)
|
||||
endif
|
||||
endif
|
||||
@ -128,10 +115,7 @@ auto state waiting
|
||||
EndState
|
||||
|
||||
function GasExplode(objectReference causeActor)
|
||||
;if (causeActor as actor)
|
||||
self.setActorCause(causeActor as actor)
|
||||
;endif
|
||||
; debug.Trace(self + " has exploded")
|
||||
self.setActorCause(causeActor as actor)
|
||||
self.damageObject(5)
|
||||
endFunction
|
||||
|
||||
@ -161,5 +145,5 @@ event onReset()
|
||||
endEvent
|
||||
|
||||
event OnDestructionStageChanged(int aiOldStage, int aiCurrentStage)
|
||||
; debug.Trace(self + " has received destruction event #" + aiCurrentStage)
|
||||
;
|
||||
endEvent
|
||||
|
Loading…
Reference in New Issue
Block a user