Using Strings in Message Boxes

Post » Sat Nov 17, 2012 2:55 am

Is there a way to use strings in a Message Box?

I know how to pass numbers into a message, but not strings.

So for example, let's say I has an int variable where if set to 1 that means "Green" is the player's favorite color, where if 2 it means "Blue" is the favorite.

Then I want to display a Message Box that tells you whether that variable is set to "Blue" or "Green" ... like:

"Your favorite color is currently set to: Blue"

Is this possible?
User avatar
Mrs Pooh
 
Posts: 3340
Joined: Wed Oct 24, 2007 7:30 pm

Post » Sat Nov 17, 2012 7:27 am

It's possible, but to the best of my knowledge only via an ugly kluge. What you'd need to do is create actors or locations named the strings you want--"Blue" and "Green" and so forth--and then fill an alias in a quest that owns the message with the appropriate actor/location depending on what the PC has chosen. Then, you can use http://www.creationkit.com/Text_Replacement to display the name of the alias--your desired string--in your message.
User avatar
e.Double
 
Posts: 3318
Joined: Tue Jul 24, 2007 11:17 pm

Post » Sat Nov 17, 2012 12:52 am

You may be able to do that using custom 'game settings', which can be set to strings. Lemme know if it works as that would be pretty cool.
User avatar
Isabella X
 
Posts: 3373
Joined: Sat Dec 02, 2006 3:44 am

Post » Sat Nov 17, 2012 3:12 am

@DreamKing : I assume the "ugly kluge" you are referring to is generation from Papyrus. IE:

Spoiler

String msg = "Your favorite color is currently set to: "
if 1 == fav
msg += "Green"
elseif 2 == fav
msg += "Blue"
endif
Debug.MessageBox(msg)
User avatar
Shannon Lockwood
 
Posts: 3373
Joined: Wed Aug 08, 2007 12:38 pm


Return to V - Skyrim