Ricebug on 24/6/2013 at 21:31
I've done this with switches and levers but how do I get text to appear when I frob something, in this case, loot?
LarryG on 24/6/2013 at 21:58
Quote Posted by Ricebug
Getting Text To Appear When You Frob Loot I've done this with switches and levers but how do I get text to appear when I frob something, in this case, loot?
How do you want it to appear? On screen text? NVOnscreenText is good. Just use NVOnscreenTextOn="FrobWorldEnd" and put it on the loot.
Quote:
NVOnscreenText (NVTrap)
Loads a book string and displays both the text and the quest variable that it specifies onscreen.
This behaves slightly differently from a standard book; rather than simply displaying the value of the string "page_0", it displays first the contents string "page_0", then the value of the quest variable specified in the string "QVar", and finally the contents of "page_1".
So, for example (assuming that the quest variable TestQVar is 54), the string file:
Page_0: "At present, the qvar is "
QVar: "TestQVar"
Page_1: ". Thank you for asking."
would be displayed as "At present, the qvar is 54. Thank you for asking."
You can also use Design Note parameters instead of a string file. Use the parameters NVPage_0, NVQVar, and NVPage_1. You can also use NVText instead of NVPage_0 for simple onscreen texts.
As of NVScript v1.1.0, you can specify a colour via the NVOnscreenTextColour parameter. Colours can be specified as either basic colour names (e.g. "red" or "blue"), or as a HTML-style colour code (e.g. #ff0000 or #0000ff).
Also as of NVScript v1.1.0, you can use the NVOnscreenTextFocusRead=0 parameter to make the object not automatically display its text when focused. This can be extremely useful when used in combination with Script, FocusScript FrobInfo, as this will make the text appear on screen when the object is frobbed, and remain there for as long as the player is looking at the object.
Ricebug on 25/6/2013 at 04:39
I'd like to appear on the screen when the loot is in the player's focus.
So where do these parameters go? I put NVOnscreenTextFocusRead=1;NVOnscreenTextColour=red:"This is it!" in the Design Note and got nuttin'.
Then I made a text.str file and put:
[INDENT]NVOnscreenTextFocusRead=1
NVOnscreenTextColour=red
page_0:"This is it!"[/INDENT]
Same result. The loot has Frob Info/Move,Script,FocusScript
Then I tried putting NVText in the Scripts dialog.
The instructions aren't too clear.
LarryG on 25/6/2013 at 05:33
1. Do the book text just like you normally would for a scroll or book, i.e. point the Book\Text property at the str file. And have whatever text you want displayed in that file as is normal. NVOnscreenText will loads the Page_0 text and display it on-screen.
2. If you want to change the text color, or any other customization provided by the script, use Editor/Design note to do so. So NVOnscreenTextColour="red"; would be your design note if you want red text.
Read the 1st page of the NVScripts documentation. It explains how all of those scripts use the design note.
Ricebug on 25/6/2013 at 13:18
Now it works. Putting NVOnscreenText in the Scripts dialog is what was missing. I had NVText there, which the docs say you can use. Thanks, my man.
LarryG on 25/6/2013 at 14:31
You can use that, but I advise it only for quick testing. Suppose you want to release the mission in another language? You want external text files for that.