|  | 
 
 楼主|
发表于 2021-7-12 15:11:42
|
显示全部楼层 
| 大哥你这么厉害你能帮我看下吗?我修改了一下,现在游戏可以运行,按照之前那个大佬说的,现在游戏运行两次都只会显示一个名字,有什么解决办法吗?
 screen single_stat(name, hp, hp_max, lv, ex, ex_max,xalign):
 
 frame:
 xalign xalign
 
 vbox:
 spacing 5
 
 hbox:
 text "[name!t]" min_width 220
 text _(" Lv. [lv]")
 
 hbox:
 text _("HP"):
 min_width 40
 yalign 0.5
 
 bar:
 value AnimatedValue(hp, hp_max, 1.0)
 xmaximum 180
 ysize 26
 
 text " [hp]/[hp_max]":
 yalign 0.5
 
 hbox:
 text _("ex"):
 min_width 40
 yalign 0.5
 
 
 bar:
 value AnimatedValue(ex, ex_max,1.0)
 xmaximum 180
 ysize 26
 
 text " [ex]/[ex_max]":
 yalign 0.5
 
 
 screen stats():
 
 use single_stat(_("英雄"), hero_hp, hero_hp_max, hero_lv, hero_ex, hero_ex_max, 0.0)
 use single_stat(_("魔王"), Devil_hp, Devil_hp_max, Devil_lv,Devil_ex, Devil_ex_max, 1.0)
 
 ## 英雄 数值。
 default hero_hp = 50
 default hero_hp_max = 100
 default hero_lv = 10
 default hero_ex = 10
 default hero_ex_max = 999
 
 ## 魔王 数值。
 default Devil_hp = 100
 default Devil_hp_max = 100
 default Devil_lv = 90
 default Devil_ex = 90
 default Devil_ex_max = 999
 
 # 游戏在此开始。
 label start:
 
 show screen stats
 with dissolve
 
 "英雄需要治疗。"
 $ hero_hp = 100
 $ hero_ex = 100
 "治疗完成。"
 
 
 "魔王等级太高了?"
 $ Devil_lv = 10
 
 "现在都是10级了。"
 
 hide screen stats
 "关闭数值显示界面"
 ##第二次循环
 screen single_stat(name, hp, hp_max, lv, ex, ex_max,xalign):
 
 frame:
 xalign xalign
 
 vbox:
 spacing 5
 
 hbox:
 text "[name!t]" min_width 220
 text _(" Lv. [lv]")
 
 hbox:
 text _("HP"):
 min_width 40
 yalign 0.5
 
 bar:
 value AnimatedValue(hp, hp_max, 1.0)
 xmaximum 180
 ysize 26
 
 text " [hp]/[hp_max]":
 yalign 0.5
 
 hbox:
 text _("ex"):
 min_width 40
 yalign 0.5
 
 
 bar:
 value AnimatedValue(ex, ex_max,1.0)
 xmaximum 180
 ysize 26
 
 text " [ex]/[ex_max]":
 yalign 0.5
 
 
 screen stats():
 
 use single_stat(_("英雄2"), hero_hp1, hero_hp_max1, hero_lv1, hero_ex1, hero_ex_max1, 0.0)
 use single_stat(_("魔王2"), Devil_hp1, Devil_hp_max1, Devil_lv1,Devil_ex1, Devil_ex_max1, 1.0)
 
 ## 英雄 数值。
 default hero_hp1 = 20
 default hero_hp_max1 = 998
 default hero_lv1 = 20
 default hero_ex1 = 20
 default hero_ex_max1 = 99
 
 ## 魔王 数值。
 default Devil_hp1 = 10
 default Devil_hp_max1 = 99
 default Devil_lv1 = 10
 default Devil_ex1 = 99
 default Devil_ex_max1 = 22
 
 # 游戏在此开始。
 label start2:
 
 show screen stats
 with dissolve
 
 "英雄需要治疗。"
 $ hero_hp1 = 12
 $ hero_ex1 = 13
 "治疗完成。"
 
 
 "魔王等级太高了?"
 $ Devil_lv1 = 20
 
 "现在都是10级了。"
 
 hide screen stats
 "关闭数值显示界面"
 
 | 
 |