scn SE13JyggylagSCRIPT
float fadeTimer ; used to fade him out when he dies
float alpha ; used to fade him out
short fadeStage ; ditto
float timer ; used for voice
begin OnDeath
; trigger quest stage when J dies
setstage SE13 100
set fadeStage to 1
end
begin OnHit
if getRandomPercent <= 33 && getav health > 15 && timer <= 0
set timer to SE13BossMarker.Say SE13JyggalagVoice 1 SEJyggalagVoice 1
endif
end
begin OnStartCombat player
set timer to SE13BossMarker.Say SE13JyggalagVoice 1 SEJyggalagVoice 1
end
begin gamemode
if timer > 0
set timer to timer - GetSecondsPassed
endif
;this chunk fades him out after summon
if ( fadeStage == 1 )
Set alpha to 0.9
Set fadeTimer to 4
SetActorAlpha alpha
set fadeStage to 2
endif
if ( fadeStage == 2 )
if ( fadeTimer > 0 )
Set fadeTimer to ( fadeTimer - GetSecondsPassed )
Set alpha to ( alpha - .01 )
SetActorAlpha alpha
elseif ( fadeTimer <= 0 )
Set alpha to 0
Set fadeStage to 3
Set fadeTimer to 0
disable
endif
endif
end
|