Difference between revisions of "Talk:MessageBox Tutorial/Spell Scripts"

Jump to navigation Jump to search
more testing, can't duplicate ScriptEffectFinish not firing
imported>ShadowDancer
(put updated line in wrong spot in script)
imported>ShadowDancer
(more testing, can't duplicate ScriptEffectFinish not firing)
Endif
Endif
Set SEUCount to SEUCount + 1
::Hmm. Interesting, but not very likely in a 4 second duration. I think you would have to be actively trying to get that to happen in 4 seconds. Could drop the effect shader duration though, or even do the StopMagicShaderVisuals twice, once in the ScriptEffectUpdate section and once in the ScriptEffectFinish.
::--[[User:ShadowDancer|ShadowDancer]] 16:59, 30 August 2007 (EDT)
 
:::Umm, apparently I am not sure what they are talking about. I tried resting in the ''Dispel'' section of the spell and still got the MessageBox popping up in the middle of the countdown for resting/sleeping, so I know that the ScriptEffectFinish block is firing while resting. This is after setting rest time and starting the countdown for resting. The only thing that didn't work properly is the spell being recast due to resting, but then again, at the point of dispelling the spell, it wouldn't be recast anyways. The effect shader was still there on waking but immediately fades away, which makes a peculiar sort of sense with the way they work in Oblivion since there is always a fadeout time on them.
 
Script:
Scriptname SCTrialEffect
Float Timer
Short Button
Short DoOnce
Short SEUCount
Short GMCount
Short MBVariable
Short MMCount
Ref TargetRef
Begin ScriptEffectStart
Set TargetRef to GetSelf
Message "Spell Started"
End
Begin ScriptEffectUpdate
If MBVariable == 0 && SEUCount > 120
Set Button to GetButtonPressed
If Button == 0
MessageBox "Script Effect Update Mode"
Set MBVariable to 1
ElseIf Button == 1
MessageBox "Game Mode"
Set MBVariable to 1
EndIf
;Start Dispel Block
If (DoOnce == 0)
PlayMagicShaderVisuals effectAtronachFlame
Set DoOnce to 1
Set Timer to 4
ElseIf (Timer > 0)
Set Timer to Timer - GetSecondsPassed
ElseIf (Timer < 0)
StopMagicShaderVisuals effectAtronachFlame
Set Timer to 0
TargetRef.Dispel SCTestFire
EndIf
;End Dispel Block
EndIf
Set SEUCount to SEUCount + 1
End
Begin GameMode
Set GMCount to GMCount + 1
End
Begin ScriptEffectFinish
Player.StopMagicShaderVisuals effectAtronachFlame
MessageBox "ScriptEffectUpdate Count = %3.0f GameMode Count = %3.0f", SEUCount, GMCount, "SEU Mode", "Game Mode"
Set Button to GetButtonPressed
TargetRef.Cast SCTestFire TargetRef
End
 
:::--[[User:ShadowDancer|ShadowDancer]] 06:58, 31 August 2007 (EDT)
Anonymous user

Navigation menu