Difference between revisions of "Talk:MessageBox Tutorial"

Jump to navigation Jump to search
2,521 bytes added ,  22:25, 25 August 2007
how my concept would look
imported>ShadowDancer
(Working Multi-Menu Spell Script)
imported>ShadowDancer
(how my concept would look)
Line 68: Line 68:


:::::--[[User:Haama|Haama]] 22:19, 25 August 2007 (EDT)
:::::--[[User:Haama|Haama]] 22:19, 25 August 2007 (EDT)
::::::OK, it would be an addition to the ScriptEfectUpdate block and look something like:
scn MenuVariablesScript
Short Choosing
Short Choice
''Short DoOnce
Begin SpellEffectStart
  ;Whatever you want to do
  Set Choosing to -1
End
Begin SpellEffectUpdate
  If (Choosing == -1) ;Display your menu
    Messagebox "What do you want to do?", ["Button0"], ..., ["Button8"], "Next Page"
    Set Choosing to 1
    Set Choice to GetButtonPressed
  Elseif (Choosing == 1)
    If (Choice == -1) ;No choice yet
      Set Choice to GetButtonPressed
      Return
    Elseif (Choice == 0) ;Button0
      ;Whatever you want to do
      Set Choosing to 0
...
    Elseif (Choice == 8) ;Button8
      ;Whatever you want to do
      Set Choosing to 0
    Elseif (Choice == 9) ;Next Page
      Set Choosing to -2 ;Following menu (choosing == -2)
    Endif
  Elseif (Choosing == -2) ;Gold menu
    Messagebox "What do you want to do?", ["Button0"], ..., ["Button8"], "Exit"
    Set Choosing to 2
    Set Choice to GetButtonPressed
  Elseif (Choosing == 2)
    If (Choice == -1) ;No choice yet
      Set Choice to GetButtonPressed
    Elseif (Choice == 0) ;Button0
      ;Whatever you want to do
      set Choosing to 0
    ...
    Elseif (Choice == 8) ;Button8
      ;Whatever you want to do
      Set Choosing to 0
    Elseif (Choice == 9) ;Exit
      Set Choosing to 0 ;to close the menus
    Endif
''  ElseIf (Choosing == 0)
''    If (DoOnce == 0)
''      PlayMagicShaderVisuals effectEnchantMysticism ;or whatever effect shader
''      Set DoOnce to 1
''      Set Timer to 4
''    ElseIf (Timer > 0)
''      Set Timer to Timer - GetSecondsPassed
''    ElseIf (Timer <= 0)
''      StopMagicShaderVisuals effectEnchantMysticism ;or whatever effect shader
''      Player.Dispel ;spell name using script
''    EndIf
  Endif
End
::::::The things I would add are the italicized sections and just remove the ScriptEffectFinish block. Setting the Duration on the spell to 30 should give someone more than enough time to make a choice on a smaller menu and to even flip between menus.  If the menus are more complex requiring more time, just raise the Duration of the spell to give them more time. Any change that clicking the button does can be done when the GetButtonPressed returns a value. The Dispel will get rid of the active spell and no worries about a spell hanging there doing nothing.
::::::--[[User:ShadowDancer|ShadowDancer]] 23:25, 25 August 2007 (EDT)


:Actually, I did get the multi-menu spell script working. See Raziel23x's script [[User talk:Raziel23x#Regarding your MessageBox question|here]] for a working MessageBox with multiple menus. The only thing I didn't do were the things I said I would do if I were writing the script since I didn't know if he would want them. Additionally, using a single page menu works fine in the ''Alter Weather'' spell that I created, since I couldn't see a reason to write 7 different spells for each weather function in Tamriel, that I used for testing purposes for information for the [[Talk:ScriptEffectUpdate]] page. The original spell script I threw up was essentially a reduced version of what I did for Raziel23x's script.
:Actually, I did get the multi-menu spell script working. See Raziel23x's script [[User talk:Raziel23x#Regarding your MessageBox question|here]] for a working MessageBox with multiple menus. The only thing I didn't do were the things I said I would do if I were writing the script since I didn't know if he would want them. Additionally, using a single page menu works fine in the ''Alter Weather'' spell that I created, since I couldn't see a reason to write 7 different spells for each weather function in Tamriel, that I used for testing purposes for information for the [[Talk:ScriptEffectUpdate]] page. The original spell script I threw up was essentially a reduced version of what I did for Raziel23x's script.
:--[[User:ShadowDancer|ShadowDancer]] 22:38, 25 August 2007 (EDT)
:--[[User:ShadowDancer|ShadowDancer]] 22:38, 25 August 2007 (EDT)
Anonymous user

Navigation menu