We decided to do it like that - speaking character steps forward, and then steps back when he done speaking his line. Also usualy they change their posture when they step in.
The direct solution how to make is that:
Code: Select all
show Tom 1:
align (.5, 1.)
xoffset tom_xoffset
zoom 1.0
parallel:
linear .3 zoom 1.05
parallel:
"Tom 2" with Dissolve(.3)
tom "Hi!"
show Tom 2:
align (.5, 1.)
xoffset tom_xoffset
zoom 1.05
parallel:
linear .3 zoom 1.0
parallel:
"Tom 1" with Dissolve(.3)
Code: Select all
define tom_xoffset = -300
define step_in = 1.05
define step_out = 1.00
default tom_sprite_cur = "Tom 1"
default tom_zoom_cur = step_out
transform tom_pos:
align (.5, 1.)
xoffset tom_xoffset
label tom_upd(sprite_new = None, zoom_new = None):
hide Tom
hide tom_sprite_cur
if sprite_new is None:
$ sprite_new = tom_sprite_cur
if zoom_new is None:
$ zoom_new = tom_zoom_cur
show expression tom_sprite_cur:
tom_pos
parallel:
zoom tom_zoom_cur
linear .3 zoom zoom_new
parallel:
sprite_new with Dissolve(.2)
pause .01
$ tom_zoom_cur = zoom_new
$ tom_sprite_cur = sprite_new
return
Code: Select all
call tom_upd("Tom 2", step_in)
tom "Hi!"
call tom_upd("Tom 1", step_out)
call bob_upd("Bob 2", step_in)
bob "Hi!"
call bob_upd("Bob 1", step_out)
The good thing that novel I'm working on will have a disabled rollback feature for various reasons so player won't get this error.
Still this error and a neccessity to add pause .01 statement before I update character related variables for unknown for me reasons demonstrates that I don't truly understand the way Renpy works and what best solution should be here.
So, the questions are
1. Why an error with zoom_new happens
2. How it could be fixed
3. What is the better solution for this situation