我认为玩家选择他们的颜色会很好。 我的第一次尝试是:
define K = Character("Keeper")
define favcolor = (color="#ffffff")
define p1 = Character("Player1", (favcolor))
label start:
K "Got a favorite color?"
menu:
"Blue":
$ favcolor = color="#0033ff"
jump Style
"Red":
$ favcolor = color="#ff3300"
jump Style
"Yellow":
$ favcolor = color="#ffcc00"
jump Style
label Style:
p1 "Now I be styl'n"
但是我收到语法错误。可能因为我不知道我在做什么。
答案 0 :(得分:1)
似乎更新已改变其工作原理。但是,以下方法确实有效:
define K = Character("Keeper")
define E = Character('Eric', dynamic=True, color="#ffffff")
## The game starts here.
label start:
K "Got a favorite color?"
menu:
"Blue":
$ E = Character('Eric', color="#0000ff")
jump Style
"Red":
$ E = Character('Eric', color="#ff3300")
jump Style
"Yellow":
$ E = Character('Eric', color="#ffcc00")
jump Style
label Style:
E "Now I be styl'n"
如果我能找到更好的解决方法,我会更新答案。