Code: Select all
screen fable_2_minigame:
add "minigame/Fable_bar.png" align(0.5,0.5)
add "minigame/Fable_point.png" at fable_point_move(fable_minigame_bar)
text "[fable_minigame_score]\nHIT" size 35 color "#dde4e5" align(0.5,0.1)
text "[fable_minigame_death]\nDamage" size 35 color "#dde4e5" align(0.5,0.2)
#text "[fable_minigame_bar]\nЗначение бара" size 20 color "#dde4e5" align(0.5,0.3)
#text "[fable_you_press_button]" align(0.5,0.3)
if fable_minigame_bar >= -6 and fable_minigame_bar <= 8:
key "K_SPACE":
if fable_you_press_button == 0:
if fable==1:
if fable_minigame_score < 4:
action [SetVariable("fable_minigame_score", fable_minigame_score + 1), SetVariable("fable_you_press_button", fable_you_press_button + 1), Show("you_press_button_good")]
else:
action Jump("Black_house")
elif fable==2:
if fable_minigame_score < 6:
action [SetVariable("fable_minigame_score", fable_minigame_score + 1), SetVariable("fable_you_press_button", fable_you_press_button + 1), Show("you_press_button_good")]
else:
action Jump("Battle")
elif fable_you_press_button == 1:
action SetVariable("fable_minigame_score", fable_minigame_score + 0)
elif fable_you_press_button == -1:
action SetVariable("fable_minigame_score", fable_minigame_score + 0)
else:
key "K_SPACE":
if fable_you_press_button == 0:
if fable_minigame_death < 1:
action [SetVariable("fable_minigame_death", fable_minigame_death + 1), SetVariable("fable_you_press_button", fable_you_press_button +1), Show("you_press_button_bad")]
else:
if fable==1:
action Jump("fable_deadend")
elif fable==2:
action Jump("fable_deadend2")
elif fable_you_press_button == 1:
action SetVariable("fable_minigame_death", fable_minigame_death + 0)
elif fable_you_press_button == -1:
action SetVariable("fable_minigame_death", fable_minigame_death + 0)
P.S. - Sorry for my bad English...