Jump to content

DOWNLOAD MODS

Are you looking for something shiny for your load order? We have many exclusive mods and resources you won't find anywhere else. Start your search now...

LEARN MODDING

Ready to try your hand at making your own mod creations? Visit the Enclave, the original ES/FO modding school, and learn the tricks of the trade from veteran modders...

JOIN THE ALLIANCE

Membership is free and registering unlocks image galleries, project hosting, live chat, unlimited downloads, & more...

Paragraphs in a Message Box: Possible?


Cliffworms
 Share

Recommended Posts

Another question if I may. %r works great. No problem there. What's wrong in my script is that the variables do not reset correctly once the Messagebox closes. 

Even if I specify that the variables are set to 0, they do not get reset. The message closes and they stay at the same value. 

 

 

Here is the script:

scn OCAMinstrelTales

short Button

short TaleSelection
short TaleContinue

Begin GameMode

If TaleSelection == 0
  return
elseif TaleSelection == 1
  If TaleContinue == 0
     MessageBoxEx "Some patrons stop talking as they turn their head towards the minstrel, ready to listen to the story. %%r ''There is a story about the Thieves Guild Master and the skull that is probably fiction, but highly amusing. The Master used the skull on her enemy, creating a clone of him to fight. |[Continue]|[Leave]"
     set TaleContinue to -1
     set button to -1

elseif TaleContinue == -1
     set button to getbuttonpressed
      if button == -1
        Return
      elseif button == 0
           MessageBoxEx "After defeating the original, the clever duplicate snatched the Skull from the Master and used it on her. Although the cloned enemy could not directly attack the Master, it could use the Skull to create a duplicate Master. %%rThe two clones jointly ruled the Thieves Guild for years."
           moddisposition Player 2
           set TaleSelection to 0
           Set TaleContinue to 0
           set button to -1
      elseif button == 1
           moddisposition Player -2
           set button to -1
           set TaleSelection to 0
           Set TaleContinue to 0
           return
      Endif
Endif
Endif



End
Edited by Cliffworms
Link to comment
Share on other sites

  • 2 months later...

Have you tried moving the variable thingies before messageboxes? Just to try if it makes any difference. Also, you did remember that:

  • GetButtonPressed only returns the button in the one frame (some say two) that follows the picking of the button
  • Oblivion engine always examines whole If...ElseIf...Else...EndIf statement before it does anything about it, so if you want to keep thing simple, especially on complex or long scripts, or ones that run every frame, you can try using a single If-check combined with Return at the start, just as a suggestion, also helps avoid unnecessary If-checks later on

Just an idea, hopefully it helps a little. Good luck with your project (below is just an attempt, might not work, untested, I just could not resist). :thumbsup:

ScriptName OCAMinstrelTales

short Button
short TaleSelection
short TaleContinue

Begin GameMode

    If ( TaleSelection == 0 )
        Return
    EndIf

    If ( TaleContinue == 0 )
        set Button to -1
        set TaleContinue to -1
        MessageBoxEX "Some patrons stop talking as they turn their head towards the minstrel, ready to listen to the story. %%r ''There is a story about the Thieves Guild Master and the skull that is probably fiction, but highly amusing. The Master used the skull on her enemy, creating a clone of him to fight. |[Continue]|[Leave]"
        Return
    EndIf

    set Button to GetButtonPressed

    If ( Button < 0 )
        Return
    EndIf

    If ( Button == 0 )
        ModDisposition Player 2
        MessageBoxEx "After defeating the original, the clever duplicate snatched the Skull from the Master and used it on her. Although the cloned enemy could not directly attack the Master, it could use the Skull to create a duplicate Master. %%rThe two clones jointly ruled the Thieves Guild for years."
    ElseIf ( Button == 1 )
        ModDisposition Player -2
    EndIf

    set Button to -1
    set TaleSelection to 0
    Set TaleContinue to 0

End
Edited by PhilippePetain
edited script a little
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...