I had a look at some example scripts here and there and here is what I have come up with:
scn 0deathXfade
begin OnDeath
set fade to 1
if ( fade > 0)
set fade to fade - 0.3
CreatureREFERENCE.SetActorAlpha fade
endif
end
short Deadshort FadeOncefloat DeadTimerfloat RefsAlpha If ( Dead == 1 ) Set DeadTimer to ( DeadTimer + GetSecondsPassed ) If ( DeadTimer >= 2 ) Set FadeOnce to 1 EndIf EndIf If ( FadeOnce == 1 ) Set RefsAlpha to 0.9 Set FadeTimer to 4 YourActorRefGoesHere.SAA RefsAlpha Set FadeOnce to 2 EndIf If ( FadeOnce == 2 ) If ( FadeTimer > 0 ) Set FadeTimer to ( FadeTimer - GetSecondsPassed ) Set RefsAlpha to ( RefsAlpha - .01 ) YourActorRefGoesHere.SAA RefsAlpha ElseIf ( FadeTimer <= 0 ) Set RefsAlpha to 0 Set FadeOnce to 0 Set FadeTimer to 0 YourActorRefGoesHere.Disable EndIf EndIfEnd
scn MyDeathFadeScriptfloat myAlphashort myStatebegin OnDeath set myState to 1 set myAlpha to 0.9endbegin GameMode if myState > 0 if myState == 1 set myAlpha to myAlpha - GetSecondsPassed if myAlpha < 0 set myState to 2 return else SAA myAlpha endif endif if myState == 2 disable set myState to 0 endif endifend
set myAlpha to myAlpha - ( GetSecondsPassed / 2 )