24 lines
639 B
Plaintext
24 lines
639 B
Plaintext
|
Scriptname _00E_A1_InvisibilityScript extends activemagiceffect
|
||
|
|
||
|
Perk Property _00E_A1_InvisibilityPerk Auto
|
||
|
|
||
|
float SneakBefore
|
||
|
float SneakModBefore
|
||
|
Event OnEffectStart(Actor akTarget, Actor akCaster)
|
||
|
|
||
|
SneakBefore = akCaster.GetActorValue("Sneak")
|
||
|
SneakModBefore = akCaster.GetActorValue("SneakMod")
|
||
|
|
||
|
akTarget.SetActorValue("SneakMod", 100)
|
||
|
akTarget.SetActorValue("Sneak", 100)
|
||
|
akTarget.AddPerk(_00E_A1_InvisibilityPerk)
|
||
|
|
||
|
EndEvent
|
||
|
|
||
|
Event OnEffectFinish(Actor akTarget, Actor akCaster)
|
||
|
|
||
|
akTarget.SetActorValue("SneakMod", SneakModBefore)
|
||
|
akTarget.SetActorValue("Sneak", SneakBefore)
|
||
|
akTarget.RemovePerk(_00E_A1_InvisibilityPerk)
|
||
|
|
||
|
EndEvent
|