4
Fork 0
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

41 lines
979 B

scriptName defaultFakeSummonSpell extends Actor
{A script to 'fake' summoning and banishing actors. By default, just 'summons' on activation, although optional Summon/Banish functions exist for more scripted use.}
Activator property summonFX Auto
Activator property banishFX Auto
bool property summoned = False Auto
auto State Waiting
Event OnActivate(ObjectReference or)
if (or != (Game.GetForm(0x14) as Actor))
GoToState("Done")
Summon()
EndIf
EndEvent
EndState
state Done
Event OnActivate(ObjectReference or)
;Do nothing.
EndEvent
EndState
;Optional way to trigger the Summon FX in more scripted situations.
Event Summon()
if (!Self.IsDead() && !summoned)
Self.PlaceAtMe(SummonFX)
Utility.Wait(1)
Self.Enable(True)
summoned = True
EndIf
EndEvent
;Optional way to trigger the Banish FX in more scripted situations.
Event Banish()
if (!Self.IsDead() && summoned)
Self.PlaceAtMe(BanishFX)
Self.Disable(True)
summoned = False
EndIf
EndEvent