1/How can i make scene loop infinity without windows text ?
Firstly you create your animation.
For this, you need to
You must be registered to see the links
, but instead of just giving it the name of a picture, you'll defined it
You must be registered to see the links
(Animation and Transform Language). So, something like this :
Code:
image myAnimation:
"myAnim/first frame.jpg"
pause 0.5
"myAnim/second frame.jpg
pause 0.5
repeat
The name of the created image object is "myAnimation", and it contain two pictures, "myAnim/first frame.jpg" and "myAnim/second frame.jpg". Ren'py will wait 0.5 seconds after it have displayed each picture, and it will repeat this indefinitely.
Note that you don't need to give the full path. Like Ren'py expect a picture here, it will automatically add "game/images/" on top of the relative path you gave.
Here, the animation is basic, but the ATL permit to do way more
You must be registered to see the links
.
Once you've defined the animation, you just need to display it, and ask Ren'py to wait for the player to do something, indefinitely if needed. For this, just use the pause statement.
Code:
label blablabla:
"I'll play you a little animation"
show myAnimation
pause
hide myAnimation
"Now return to the game"
2/How can i set bar value in script, i want bar interact with players choice ?
Your question lack of precision. Is the player directly interacting with the bar ? Is the bar some kind of visual representation of a counter ? Is it something other ? The answer is to use the
You must be registered to see the links
statement of the screen language, but difficult to give a practical example without knowing what you effectively want. So, here a decreasing counter.
As it, it will prevent any action of the player during a given amount of time. Coupled to your animation it will force the player to see it whole at least once, then let him decide how many time he want to wait after this :
Code:
image myAnimation:
"myAnim/frame01.jpg"
pause 0.5
"myAnim/frame02.jpg"
pause 0.5
"myAnim/frame03.jpg"
pause 0.5
"myAnim/frame04.jpg"
pause 0.5
"myAnim/frame05.jpg"
pause 0.5
"myAnim/frame06.jpg"
pause 0.5
repeat
label blablabla:
"I'll play you a little animation"
show myAnimation
# 6 frames with 0.5 pause between each, so a 3 seconds animation
call screen myScreen( 3.0 )
pause
hide myAnimation
"Now return to the game"
screen myScreen( delay=1.0 ):
zorder 2000
default remainingTime = delay
default step = 0.01
timer step repeat True action If( remainingTime <= 0, Return(), SetScreenVariable( "remainingTime", remainingTime - step ) )
# Here is the bar.
bar:
# The actual value of the bar
value remainingTime
# The value representing 100% of the bar.
range delay
xpos 50
ypos config.screen_height - 5
xsize config.screen_width - 100
ysize 5