Ok. Here comes a big story. I have created a spell that changes the eye texture to a blind for a minute. As long as I activate the spell in 3rd person view, everything is fine. But if i activate the spell in 1st person view and then change to 3rd person, there is no change to eyes. So i was trying a solution and came up with an idea. Using the Utility.Wait 60 times one at every second even if i changed to 3rd person view the change eye texture command should be still activated. Refreshing the face at the Event OnFinish restores the eyes to the original color. Everything works perfectly up to here. The only problem is that if i use the T button(Wait). the time still counts and the commands are still be activated for the rest of the minute. So if i could put a command on Event OnFinish that disables the script, i think that the problem will be solved cause after waitng the spell would expire, then the Event OnFinish and the rest of the script would be disabled.
Scriptname polymorphEyes extends activemagiceffect
;=== Imports ===--
Import Utility
Import Game
;=== Variables ===--
Actor _Caster
;=== Properties ===--
TextureSet property BlindEyes auto
Event OnEffectStart(Actor akTarget, Actor akCaster)
Utility.Wait(1)
akCaster.SetEyeTexture(BlindEyes)
Utility.Wait(2)
akCaster.SetEyeTexture(BlindEyes)
Utility.Wait(3)
akCaster.SetEyeTexture(BlindEyes)
Utility.Wait(4)
akCaster.SetEyeTexture(BlindEyes)
Utility.Wait(5)
akCaster.SetEyeTexture(BlindEyes)
.
.
.
.
.
.
.
EndEvent
Event OnEffectFinish(Actor akTarget, Actor akCaster)
RefreshFace()
EndEvent
Function RefreshFace()
If !_Caster
Return
EndIf
String facegen = "bUseFaceGenPreprocessedHeads:General"
SetINIBool(facegen, False)
_Caster.QueueNiNodeUpdate()
SetINIBool(facegen, True)
EndFunction
(Please remove the dots in the script. I used them to save time and space)