Oes10 Posted March 19, 2010 Share Posted March 19, 2010 Heya! Im a bit new to scripting in GECK and i have a question regarding variables in message boxes (or even dialogues). Is there any way to print out a quest script variable in messages (message boxes) ? For example if i'd set a variable to store some NPCs health percentage, and i wanted that value shown in a message box or normal message, how do i pass that value variable with "ShowMessage" so it prints out in the designated message when its displayed? Any help appreciated, thanks. :) Link to comment Share on other sites More sharing options...
HugePinball Posted March 19, 2010 Share Posted March 19, 2010 All is explained on the GECK wiki ShowMessage page. To take your example, say you have float variable name fNPCHealthPerc storing a value of 92.5, and you want a message box to display: NPC health is 92.5% - Make a new Message, give it an ID (NPCHealthMessage). For the Message Text, enter:NPC health is %.1f%%- In your script, use the line:ShowMessage NPCHealthMessage fNPCHealthPerc...and the message will be displayed. Look over the formatting notation on the ShowMessage page - looks confusing, but it's not really. And you can only do this with Messages, not dialog or anything else. If you're looking to use this for debugging, I'd strongly recommend using the FOSE function PrintToConsole instead, since you can do a hell of a lot more, and you don't have to waste time making new Message forms in the GECK. Link to comment Share on other sites More sharing options...
Oes10 Posted March 20, 2010 Author Share Posted March 20, 2010 Ah, thats great! Thanks alot for taking the time to answer. Link to comment Share on other sites More sharing options...
Recommended Posts