- Nov 24, 2018
- 1,066
- 5,243
I'm porting some of my older HTML/JavaScript games to Ren'py, and I'm trying to figure out which gameplay elements I can bring forward and which I need to leave behind.
In Renpy, I typically do animations this way:
This plays the 8 frames over and over again until the player clicks or hits space, and then jumps to the next label.
What I'd like to do is know which frame the animation was on when the player clicked and possibly act on that. For instance, maybe I would not advance if they weren't on a particular frame or frames, or maybe I'd jump to a different label for some frames than others. Things like that.
Is there any way to do this in Ren'py?
Thanks!
Tlaero
In Renpy, I typically do animations this way:
Python:
label dwe_finale58:
scene background
show dwe_sex65a at Center
show dwe_finale58_anim at Center
"Yes you can..."
jump dwe_finale59
default dwe_finale58_delay = 0.15
image dwe_finale58_anim:
"dwe_sex65a.jpg"
pause dwe_finale58_delay
"dwe_sex65a1.jpg"
pause dwe_finale58_delay
"dwe_sex65a2.jpg"
pause dwe_finale58_delay
"dwe_sex65a5.jpg"
pause dwe_finale58_delay
"dwe_sex65a8.jpg"
pause dwe_finale58_delay
"dwe_sex65a7.jpg"
pause dwe_finale58_delay
"dwe_sex65a6.jpg"
pause dwe_finale58_delay
"dwe_sex65a3.jpg"
pause dwe_finale58_delay
repeat
What I'd like to do is know which frame the animation was on when the player clicked and possibly act on that. For instance, maybe I would not advance if they weren't on a particular frame or frames, or maybe I'd jump to a different label for some frames than others. Things like that.
Is there any way to do this in Ren'py?
Thanks!
Tlaero