After a day I able to make it move, but it move everytime a character speaks.
I only want it to do the animation when they start to speak, and WHEN the speaker is switch
- I got a suggestion by by making a variable like "last_who" that save up previous charater and by checking "if who is not last_who" do the animation
by that an if else that will pick a static window or an animated window,
- but knowing that doesn't help to much since i'm new to renpy and programing, i don't know how to implement it,
Here's the code I has been cooking inside renpy screen.rpy
Code: Select all
transform windowa:
Transform(Image("gui/tbox.png", xalign=0.5, yalign=0.7), alpha=persistent.dialogueBoxOpacity)
anchor (0.5, 1.0) pos (0.5, 0.6) crop (0.0, 1.1, 1.0, 0.6)
linear 0.2 crop (0.0, 0.0, 1.0 , 1.0) pos (0.5, 1.0)
alpha 0
pause 0.02
alpha 1.0
#noted hcrop speed = move speed, zcrop speed x2 move speed
#background Transform(Image("gui/tbox.png", xalign=0.5, yalign=0.7), alpha=persistent.dialogueBoxOpacity)
screen say(who, what):
style_prefix "say"
window:
id "window"
window at windowa
if who is not None:
window:
id "namebox"
style "namebox"
text who id "who"
text what id "what"
## If there's a side image, display it above the text. Do not display on the
## phone variant - there's no room.
if not renpy.variant("small"):
add SideImage() xalign 0.0 yalign 1.0