Difference between revisions of "Talk:MessageBox Tutorial/Spell Scripts"
Jump to navigation
Jump to search
Talk:MessageBox Tutorial/Spell Scripts (edit)
Revision as of 03:58, 31 August 2007
, 03:58, 31 August 2007answers and interesting test result
imported>ShadowDancer (interesting) |
imported>ShadowDancer (answers and interesting test result) |
||
|
:::--[[User:Haama|Haama]] 14:37, 30 August 2007 (EDT)
::::Yes, if you cast this spell on a character, it will produce a spell icon in the upper right corner of the screen, which is why I included the section for the spell to be dispelled so it doesn't hang around for no reason. I don't know of an easy way to tell how much time is left in a spell other than using '''GetSecondsPassed'''. However, I just ran an interesting test. I loaded a MessageBox in the ScriptEffectFinish block with 2 buttons to choose from and added a section to the ScriptEffectUpdate block that didn't even start checking for '''GetButtonPressed''' until a set number of frames passed. The next casting of the spell still managed to catch the button press after 120 frames of not looking for it.
Script:
Scriptname SCTrialEffect
Short Button
Short SEUCount
Short GMCount
Short MBVariable
Ref TargetRef
Begin ScriptEffectStart
Set TargetRef to GetSelf
Player.PlayMagicShaderVisuals effectAtronachFlame
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
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"
TargetRef.Cast SCTestFire TargetRef
End
----
I was thinking that the '''StopMagicShaderVisuals''' statement should be down in the '''ScriptEffectFinish''' section so that it always stops the shader even if time runs out while the timer is counting down. Would you agree with that assessment?
| |||