bluemarvin Posted July 15, 2012 Share Posted July 15, 2012 Is there a way to use strings in a Message Box displayed by way of the Show function? 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? I suppose I can do this with a Debug.MessageBox command, but was wondering if there's a way with MyMsg.Show() instead? Link to comment Share on other sites More sharing options...
gasti89 Posted July 15, 2012 Share Posted July 15, 2012 Have a look at this http://www.creationkit.com/Text_Replacement It says it can be used with messages too. Link to comment Share on other sites More sharing options...
bluemarvin Posted July 16, 2012 Author Share Posted July 16, 2012 Have a look at this http://www.creationkit.com/Text_Replacement It says it can be used with messages too. Thanks, not sure if that will work for what I'm trying to do but it gives me a shot at least. I guess it will depend on if this will work outside a quest. Thanks for the idea. Link to comment Share on other sites More sharing options...
steve40 Posted July 16, 2012 Share Posted July 16, 2012 (edited) Is there a way to use strings in a Message Box displayed by way of the Show function? 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? I suppose I can do this with a Debug.MessageBox command, but was wondering if there's a way with MyMsg.Show() instead? All too easy. Simply have two different Message forms. The first has the message "Your favorite color is currently set to: Blue". The second has the message "Your favorite color is currently set to: Green".Then you simply code an "if" statement in your script: ScriptName myScript extends whatever Message Property BlueMessage auto Message Property GreenMessage auto int Property favcolor auto Event SomeEvent() If favcolor == 1 BlueMessage.show() ElseIf favcolor == 2 GreenMessage.show() EndIf EndEvent Edited July 16, 2012 by steve40 Link to comment Share on other sites More sharing options...
Recommended Posts