here's really good help on this stuff:
http://docs.textadventures.co.uk/quest/ ... ation.html (character creation, this is your guide to doing what you want, and more)
^^^^^^
http://docs.textadventures.co.uk/quest/guides/ (this is the 'how to' link in the doc main/home page ~ the link below, it's easy to not see/notice it)
^^^^
http://docs.textadventures.co.uk/quest/^^^^
path
---------------
generally people use the built-in 'alias' String Attribute to store (usually) the default 'player' Player Object's (your character's) name.
---------
my generic syntax for how to Script:
Object_name.Attribute_name
~ OR ~
Object_name.Attribute_name = Value_or_Expression
~ OR ~
if (Object_name.Attribute_name = Value_or_Expression ) { /* Script(s) */ }
so in scripting code, its:
player.alias
Object_name: player
Attribute_name: alias
if you know algebra:
x = 10
y = 50 + x
// conceptually: y = 50 + <x:10>
output: y = 60
it's the same thing:
x -> player.alias
y -> msg ("Your inputted character name is " + player.alias + ".")
player.alias = "HK"
msg ("Your inputted character name is " + player.alias + ".")
// conceptually: msg ("Your inputted character name is " + <player.alias: "HK"> + ".")
// output: Your inputted character name is HK.
--------
or, you can use the text processor commands:
http://docs.textadventures.co.uk/quest/ ... essor.htmlthe ' {Object_name.Attribute_name} ' text processor command
msg ("Your inputted character name is {player.alias}.")
// output: Your inputted character name is HK.