for example, let's say that your initial 'alias' is (in code): player.alias = "TheDarkWyrm", and you want to change it to "HK".
the syntax is the exact same, but for a String Attribute, you just need the 'Value' to have quotes on it:
set (Object, "Attribute'", "Value")
set (player, "alias", "HK")
or, an alternative script:
(in the GUI~Editor: run as script -> add a script -> Variables -> Set a variable or attribute)
Object.Attribute = Value_or_Expression
player.alias = "HK"
----------------------------------------
here it is in full:
in some script (for just the "player" Player Object in this example):
msg ("What is your new name?")
get input {
set (player, "alias", result)
msg ("Your new name is " + player.alias)
}
or
msg ("What is your new name?")
get input {
player.alias = result
msg ("Your new name is " + player.alias)
}
using both the 'get input' and 'show menu', automatically (internally by the quest engine core code) sets the built-in variable for you: result = your_selection
conceptually, quest (or any coding language for that matter) uses algebraic substitution:
msg ("What is your new name?")
get input {
-> // I'd type in: HK
-> // quest sets the built-in variable 'result' for you (you don't see it done): result = "HK"
-> // algebraic substitution below: player.alias = result = "HK -> player.alias = "HK"
-> player.alias = result
-> // your now new player's alias is: player.alias = "HK"
-> msg ("Your new name is " + player.alias + ".")
-> // outputs: Your new name is HK.
}
----------
(using a command)
<command name="alias_changing_command">
<pattern>newalias #object# and #text#</pattern>
<script>
if (object = null) {
msg ("That object doesn't exist. Try again.")
} else {
alias_changing_function (object,text)
}
</script>
</command>
<function name="alias_changing_function" parameters="object_x,text_x">
object_x.alias = text_x
msg ("The new name is" + object_x.alias)
</function>
... or ...
(using 'get input')
within some script:
msg ("What is your new name?")
get input {
player.alias = result
msg ("Your name is " + player.alias)
}
~ or ~
you can do the 'get input' within a Command too, but it's a bit pointless to do it this way.
-----------------------
String: a collection of characters, for examples:
a
1
dead
favorite_color_5
gfgv566dff3fknr04_8jh7hgfrd851
notice how the '1' is a String, but it is also an Integer...
an Integer, is an amount (non-decimal): ..., -100, -1, 0, 1 , 100, ...
an integer can be computed, for example:
old~initial Value: HK.strength = 25
HK.strength = HK.strength + 50
new Value: HK.strength = 75
so, numeral characters, can be a String or an Integer
in code, you can change between Strings and Integers:
Object.Attribute = Value
a String Attribute: HK.strength = "100"
an Integer Attribute: HK.strength = 100
(these both can't exist at the same time, as 'HK.strength' can only be one attribute type at a time)
Variable = Value
result_integer = ToInt (HK.strength)
result_string = ToString (HK.strength)
or
Object.Attrbute = Value
game.result_integer = ToInt (HK.strength)
game.result_string = ToString (HK.strength)
----------
in the GUI~Editor:
"whatever" Object -> Attributes (Tab) -> Attributes -> Add ->
As a String Attribute:
Attribute Name: strength
Attribute Type: string
Attribute Value: 100
As an Integer Attribute:
Attribute Name: strength
Attribute Type: int (integer)
Attribute Value: 100
-------
anyways, the reason this matters is that when using two or more Attributes together (in~for comparison usage), they must be the same type, else you get the 'infamous' error saying as such.
---------------------
P.S.
this probably confused you, as this is a bit more in depth coding explanation, and I just don't explain that well to begin with.
so, feel free to ask about any questions you may have, or if you still having trouble, not understanding, and need better help.