+nuclearjanitor Posted November 3, 2010 Share Posted November 3, 2010 I would like to use an author function to manipulate a variable set by a user input, display a message, and alter attributes of character commands. I understand how to do this in Builder; however, that syntax does not appear to be the same as Urwigo. I tried reading the code in the *.urwigo file to glean something there, but that is proving to be most difficult. Can somebody please offer some advice on syntax for arguements in author functions. Example, this is how I would write it in Builder. What is the translation to Urwigo speak? function zinputQuestion1:ongetinput(input) local var_name_1 = tonumber(input) local var_name_2 = (var_name_1 * 2) Wherigo.MessageBox{Text=[[Thank you, the answer is: ]] ...var_name_2... ,} zcharacterGuy.Commands["Question1"].Enabled = false zcharacterGuy.Commands["Question2"].Enabled = true end Thank you! Nick Quote Link to comment
+nuclearjanitor Posted November 3, 2010 Author Share Posted November 3, 2010 Well, I may still be in the Builder mindset... I have discovered, and am exploring, the 'Numeric operation' expression in Urwigo. This may free me from the need of an author script that would have been required for this operation in Builder... I am liking Urwigo more and more... I am still interested in syntax for author scripts, though it may just be for curiousity's sake. Quote Link to comment
brekkcaching123 Posted August 2, 2022 Share Posted August 2, 2022 On 11/2/2010 at 7:10 PM, nuclearjanitor said: I would like to use an author function to manipulate a variable set by a user input, display a message, and alter attributes of character commands. I understand how to do this in Builder; however, that syntax does not appear to be the same as Urwigo. I tried reading the code in the *.urwigo file to glean something there, but that is proving to be most difficult. Can somebody please offer some advice on syntax for arguements in author functions. Example, this is how I would write it in Builder. What is the translation to Wherigo speak? function zinputQuestion1:ongetinput(input) local var_name_1 = tonumber(input) local var_name_2 = (var_name_1 * 2) Wherigo.MessageBox{Text=[[Thank you, the answer is: ]] ...var_name_2... ,} zcharacterGuy.Commands["Question1"].Enabled = false zcharacterGuy.Commands["Question2"].Enabled = true end Thank you! Nick Thinking About It, It sounds easy, although I thought This is not possible. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.