38 lines
1.1 KiB
Plaintext
38 lines
1.1 KiB
Plaintext
Scriptname _00E_SummonableGhostShaderSC extends Actor
|
|
{This script copies a part of the code of defaultghostscript. This script is only needed for summoned creatures who still need to ghost shader, but who should not leave ectoplasm.}
|
|
|
|
Event OnLoad()
|
|
|
|
self.AddSpell(pGhostAbilityNew, true)
|
|
self.AddSpell(pGhostResistsAbility, true)
|
|
if bflicker
|
|
self.ghostFlash(1)
|
|
endIf
|
|
EndEvent
|
|
|
|
Event OnHit(objectreference akAggressor, form akSource, Projectile akProjectile, bool abPowerAttack, bool abSneakAttack, bool abBashAttack, bool abHitBlocked)
|
|
|
|
if bflicker && !pDefaultGhostWeaponFlickerList.hasform(akSource) && !abHitBlocked && !bFlash
|
|
bFlash = true
|
|
self.ghostFlash(3)
|
|
endIf
|
|
EndEvent
|
|
|
|
Function ghostFlash(float time)
|
|
|
|
pGhostFXShader.stop(self)
|
|
self.setGhost(true)
|
|
utility.wait(time)
|
|
self.setGhost(false)
|
|
self.setAlpha(0.300000, false)
|
|
pGhostFXShader.play(self, -1.00000)
|
|
bFlash = false
|
|
EndFunction
|
|
|
|
bool bFlash = false
|
|
|
|
bool Property bflicker = false Auto
|
|
EffectShader Property pGhostFXShader Auto
|
|
Formlist Property pDefaultGhostWeaponFlickerList Auto
|
|
Spell Property pGhostAbilityNew Auto
|
|
Spell Property pGhostResistsAbility Auto |