Aller au contenu

Photo

Popping up a formatted message box with paragraphs


  • Veuillez vous connecter pour répondre
2 réponses à ce sujet

#1
Tchos

Tchos
  • Members
  • 5 072 messages
At the beginning of SoZ, there are some tutorials that pop up on occasion.  I want to do something similar, but they used string refs in there, and I can't find out how it was formatted.  I gather they used a string ref from a 2DA, but I don't understand their use, and I think it might make this too complicated.  (I could be wrong.)

I was thinking the easiest way to accomplish this would be if there's a newline character.  I've found formatting codes for bold, italics, and colours, but not for a paragraph break.  I tried <p>, <br>, and <br />, and none of those worked.

Alternatively, is there a scripting command to convert a dialogue node or a journal entry into a string that I can display in a message box?  It would be most convenient if the journal could be used in this case.  Or if it's easier to use string refs than I thought.

Modifié par Tchos, 20 mai 2012 - 09:58 .


#2
kamal_

kamal_
  • Members
  • 5 258 messages
You can code the text into the scripts rather than using string refs. This is how I did the sample stronghold.
http://nwvault.ign.c...s.Detail&id=297

#3
Tchos

Tchos
  • Members
  • 5 072 messages
So, looking over your report script, it shows that \\n makes a new line, but if I try to use that in a local variable, for instance, it just prints "\\n" and doesn't make a new line, whereas if I use <b> and other markup like that, it works properly in a local variable. Any idea how I might get around that?

I'll probably end up doing it the way you're doing it in that report, though -- building a single string out of several variables with line breaks between them, since it seems to work that way. Thank you.