pop up dialog for typed user input??

ender
08 Aug 2011, 18:11
I've been looking through the files and the wiki looking to see if there is some currently existing way to get typed user input for a variable using a pop up dialog ... sort of like the showmenu command, but where the player types in the input instead of selecting from a list.

I'm trying to create a script where the player answers some questions, like "what is your name" ... before playing the game.

This is mostly a consistency issue ... I don't like directly requesting some input from the player using a popup dialog (showmenu) ... but otherwise requesting input inline ...

although, since 'showmenu' can be implemented DURING a script ... and the inline method for setting a variable using user input seems to require you to be in a room ... a startup script could greatly benefit for that method of getting input.

Pertex
08 Aug 2011, 20:18
Something like 'Set var = player input' in the editor
or scripting: 'var = GetInput()' ?

ender
08 Aug 2011, 21:15
Unfortunately, that does not pop up a dialog window ... it just takes in input from the normal user input bar ...

Although it does work during a script ... so that solves one problem.

Alex
09 Aug 2011, 08:34
Why would you want it to be a pop-up dialog? Nobody likes those.

ender
11 Aug 2011, 19:47
Well, obviously not nobody ... since I like them for direct user input ... ;)

Personally, when asking a direct question its good to have a different input interface than the general one because it lowers the impulse to try to input invalid input ... like the game asks 'whats your characters name?' ... user doesn't really read the description with the question in it, so he doesn't know its something special ... he thinks he's just in a room so he inputs 'look' ... so now his characters name is 'look' ... oops.

But mostly my concern is consistency ... the 'show menu' is a popup dialog ... so other questions for direct input should be too ... its weird to have it work one way and then the other ...

since I'm not going to get a popup dialog for direct questions ... I'm going to try to go the other route and write a function that does the same thing as showmenu but does so inline ...

Alex
12 Aug 2011, 10:06
You could use a custom Javascript file - I've not documented this yet though (I'll add some info to the wiki when I get back from Edinburgh in about a week)