What has been asked thus far (input name and input gender), falls under "character creation", which we've already got here:
http://quest5.net/wiki/Character_Creationif you need help with understanding the coding~scripting or whatever (such as explaining and~or showing it via the GUI-Editor instead), just ask for help, and we'll continue to help you further.
---------------------------------
for using a game player~user 's input, you need this:
to create and store~save it (we have to attach it to some permanent object to do this):
get input {
object_attribute_name.object_attribute_whatever=result
}
then to use it wherever you want, you need this:
object_attribute_name.object_attribute_whatever
so for example:
<game name="HK Game Testing">
// (blah blah blah other code lines)
<start type="script">
character_creation_function
</start>
// (blah blah blah other code lines)
</game>
<function name="character_creation_function">
msg ("What is your name?")
get input {
player.alias // (or you can do: game.pov.alias) (game.pov = your currently controlled Player Object) (your default player object is "player", but you can create more player objects too and switch~change control between them)
}
</function>
<object name="friend_1">
<alias>John</alias>
<displayverbs="simplestringlist">chat</displayverbs>
<chat type="script">
msg ("You say hello, and " + this.alias + " returns the greeting, \"Hello " + game.pov.alias + "!\")
</chat>
</object>
--------------------------------------
for creating a set of choices to choose from, there's a few ways to do this:
***
show menu:
(see above posts for the longer process of manually creating the list first and then "calling upon" the list, that you've created, in the "show menu" function)
or
you can use the "split" function command, it automatically creates the list with only one simple line instead (much nicer, hehe)
split ("choice_one; choice_two; choice_etc" , ";")
in full:
show menu ("your_question", split ("choice_one; choice_two; choice_3; etc_etc_etc" , ";"), true_or_false__for_whether_you_want_to_be_able_to_cancel_your_choice_aka_go_back) {
(etc etc etc script)
}
****
another way is to create your own type of list-menu (such as for example, if you don't like the window that comes up with the "show menu" or for whatever other reasons for doing it this way too, as shown below):
msg ("Type the number of the choice you want")
msg ("(1) choice_one, (2) choice_two, (3) choice_three, ... etc etc etc")
get input {
switch (result) {
case ("1)" {
msg ("choice_one_response") // you can do whatever script you want, I'm only using the "msg" script for an example
}
case ("2") {
msg ("choice_two_response") // you can do whatever script you want, I'm only using the "msg" script for an example
}
case ("3") {
msg ("choice_three_response") // you can do whatever script you want, I'm only using the "msg" script for an example
}
}
}
or you can use lists or dictionaries in the same way, but these are a bit more difficult to learn how to use.
The "switch" function command is pretty simple (hopefully) to understand it. The "switch" is just a more tidy~organized and faster way of doing (instead of having~doing) many individual "if" scripts.
------------------
how the "get input" (and all the code "definers" too) work:
Algebraic Substitution (though you've got to think about it in the correct way, as it's a bit tricky to grasp correctly)
here's a conceptual model of how it works:
HK<=>result<=>game.pov.alias
input == output
HK => result => game.pov.alias == game.pov.alias => result => HK
(this is mostly the same structure as how computers "talk" to one another, except that it goes both ways, unlike the above, which is only going from left="input" to right="output")
( the 7 layered OSI model:
http://www.petri.co.il/images/osi_model.JPG )
[ (game player~user 's) input: "HK" -> result -> game.pov.alias ] -> [ game.pov.alias -> result -> HK : (game engine's) output ]
(game player~user 's) input: "HK" -> result -> game.pov.alias
(game engine's) output: game.pov.alias -> result -> HK