WTS/game/scripts/characters/snape/chibi.rpy

72 lines
2.0 KiB
Plaintext
Raw Permalink Normal View History

2022-05-16 23:48:22 +00:00
label sna_chibi(action=None, xpos=None, ypos=None, flip=False):
$ snape_chibi.position(xpos, ypos, flip)
if action == "hide":
$ snape_chibi.hide()
return
elif action == "leave":
hide snape_main
hide screen bld1
hide screen blktone
play sound "sounds/door.ogg"
2022-05-16 23:48:22 +00:00
$ snape_chibi.hide()
with d3
pause .5
return
elif action == "reset":
$ snape_chibi.do(None)
return
$ snape_chibi.do(action)
return
label sna_walk(xpos=None, ypos=None, speed=1.0, action=None, reduce=False, path=None, flip=False):
scene onlayer dolls
2022-05-16 23:48:22 +00:00
hide screen bld1
hide screen blktone
with d3
if action == "enter":
play sound "sounds/door.ogg"
2022-05-16 23:48:22 +00:00
call sna_chibi(None, "door", "base", flip)
with d3
if xpos or ypos:
$ snape_chibi.move((xpos, ypos), speed, reduce)
elif action == "leave":
$ snape_chibi.show()
$ snape_chibi.move(("door", "base"), speed, reduce)
play sound "sounds/door.ogg"
2022-05-16 23:48:22 +00:00
$ snape_chibi.hide()
with d3
pause .5
elif path:
$ snape_chibi.show()
$ snape_chibi.move(path, speed, reduce)
else:
$ snape_chibi.show()
$ snape_chibi.move((xpos, ypos), speed, reduce)
return
# Screens
screen with_snape(ani=False):
tag hanging_with_snape
zorder 3
if ani:
add "ch_gen toast_goblet" xpos 435*2 ypos 200*2 zoom 2.0
add "snape_toast_goblet" xpos 618*2 ypos 200*2
2022-05-16 23:48:22 +00:00
else:
add "characters/genie/chibis/drinking/01.webp" xpos 435*2 ypos 200*2
add "characters/snape/chibis/drinking/01.webp" xpos 618*2 ypos 200*2
2022-05-16 23:48:22 +00:00
# Chibi definition
default snape_chibi = Chibi("snape", ["base"], update_snape_chibi)
init python:
def update_snape_chibi(chibi):
# Assume chibi action has a matching image definition
chibi_image = "ch_sna {}".format(chibi.action or "stand")
chibi["base"] = chibi_image