2021-10-05 22:15:58 +00:00
|
|
|
ScriptName dunHalldirGhostAmbushScript extends MasterAmbushScript
|
|
|
|
{Variation on the standard ambush script: Ghosts are invisible until activated.}
|
|
|
|
|
|
|
|
EffectShader property GhostShader Auto
|
|
|
|
float property GhostAlpha Auto
|
|
|
|
|
|
|
|
auto State waiting
|
|
|
|
;NEW in this variant. Ghosts begin ghosted.
|
|
|
|
Event OnLoad()
|
|
|
|
Utility.Wait(2)
|
|
|
|
self.SetAlpha(0)
|
|
|
|
GhostShader.Stop(self)
|
2023-12-08 02:45:53 +00:00
|
|
|
self.SetActorValue("Aggression", 0)
|
2021-10-05 22:15:58 +00:00
|
|
|
If helpAlliesOnTrigger
|
2023-12-08 02:45:53 +00:00
|
|
|
self.SetActorValue("Assistance", 0) ; Help nobody
|
2021-10-05 22:15:58 +00:00
|
|
|
EndIf
|
|
|
|
EndEvent
|
|
|
|
|
|
|
|
;if any of the events above are caught, we leave this state, but first we need to take care
|
|
|
|
;of setting up everything we need when we get out of our furniture.
|
|
|
|
Event onEndState()
|
|
|
|
;handle things like sarcophagus lids that are the linkedRef of the furniture
|
|
|
|
If _TryActivateLinkedRef(getLinkedRef())
|
|
|
|
_TryActivateLinkedRef(getNthLinkedRef(2))
|
|
|
|
EndIf
|
|
|
|
|
|
|
|
;set actor variables
|
2023-12-08 02:45:53 +00:00
|
|
|
self.SetActorValue(ACTOR_VARIABLE, ACTOR_VARIABLE_ON_TRIGGER)
|
2021-10-05 22:15:58 +00:00
|
|
|
_RaiseAggression()
|
|
|
|
|
|
|
|
;NEW for this variant. Ghost fades in and solidifies when activated.
|
|
|
|
self.SetAlpha(GhostAlpha, True)
|
|
|
|
GhostShader.Play(self)
|
|
|
|
|
|
|
|
;check to see if actor has a linkedRef with this keyword, if so, then activate it
|
|
|
|
If linkKeyword
|
|
|
|
_TryActivateLinkedRef(GetLinkedRef(linkKeyword))
|
|
|
|
EndIf
|
|
|
|
endEvent
|
|
|
|
endState
|