Timed choice bar not appearing?
Posted: Fri Apr 26, 2019 7:22 pm
Hi! I'm testing out timed choices and having trouble, so I figured I'd ask for help.
The problem has been that my timed choices aren't activating. They aren't appearing in the launched game and they aren't timing out after the allotted time. I've tried these two methods shown in these links:
First I tried: https://www.renpy.org/wiki/renpy/doc/co ... imed_menus
(I'm assuming this one is outdated, like the page says. It gave me a lot of error messages, so I erased all the coding I tried for this link.)
Then I tried: https://patreon.renpy.org/timed-choice-menus.html
(This approach gave me no error messages, but it also didn't work. The timer bar didn't appear and there was no timeout when I didn't choose an option.)
It would be great if you could tell me what I did wrong and how to correct this.
For Reference
This is the script section that I'm trying to time (based on the second link above):
label continue5:
k "If someone attacks, it's best that you...?"
jump dodge1
label dodge1:
$ timeout_label = "attack_hit"
menu:
"Dodge!":
k "Yes, exactly! Looks like the code is working and everything! And using this script, timd codes should be easy to replicate in the future"
k "Prety handy, huh?"
jump continue6
"Dog!":
k "Well... not quite. Most people would dodge..."
k "Let's try this again."
jump continue5
"Dab!":
k "Haha!"
k "While that WOULD be an interesting reaction, I don't think it's the smartest thing to do in a fight!"
k "Let's try this again."
jump continue5
label nochoice1:
k "You didn't choose an option... Boo..."
k "Let's try this again."
jump continue5
This is the screen section that I changed starting on line #207:
screen choice(items):
# How long the player has to make a choice in timeout seconds.
default timeout = 5.0
# The label the player is sent to if they fail to make a choice in the time
# allotted. If None, the timeout is disabled.
default timeout_label = None
# A preference that enables or disables timed choices.
default persistent.timed_choices = True
screen choice(items):
style_prefix "choice"
vbox:
for i in items:
textbutton i.caption action i.action
if (timeout_label is not None) and persistent.timed_choices:
bar:
xalign 0.5
ypos 400
xsize 740
value AnimatedValue(old_value=1.0, value=0.0, range=1.0, delay=timeout)
timer timeout action Jump(timeout_label)
This is a pic of the launched game on the menu (that should be timed). The menu appears but not the timer.
https://docs.google.com/presentation/d/ ... slide=id.p
Thanks in advance for any help you can offer!
The problem has been that my timed choices aren't activating. They aren't appearing in the launched game and they aren't timing out after the allotted time. I've tried these two methods shown in these links:
First I tried: https://www.renpy.org/wiki/renpy/doc/co ... imed_menus
(I'm assuming this one is outdated, like the page says. It gave me a lot of error messages, so I erased all the coding I tried for this link.)
Then I tried: https://patreon.renpy.org/timed-choice-menus.html
(This approach gave me no error messages, but it also didn't work. The timer bar didn't appear and there was no timeout when I didn't choose an option.)
It would be great if you could tell me what I did wrong and how to correct this.
For Reference
This is the script section that I'm trying to time (based on the second link above):
label continue5:
k "If someone attacks, it's best that you...?"
jump dodge1
label dodge1:
$ timeout_label = "attack_hit"
menu:
"Dodge!":
k "Yes, exactly! Looks like the code is working and everything! And using this script, timd codes should be easy to replicate in the future"
k "Prety handy, huh?"
jump continue6
"Dog!":
k "Well... not quite. Most people would dodge..."
k "Let's try this again."
jump continue5
"Dab!":
k "Haha!"
k "While that WOULD be an interesting reaction, I don't think it's the smartest thing to do in a fight!"
k "Let's try this again."
jump continue5
label nochoice1:
k "You didn't choose an option... Boo..."
k "Let's try this again."
jump continue5
This is the screen section that I changed starting on line #207:
screen choice(items):
# How long the player has to make a choice in timeout seconds.
default timeout = 5.0
# The label the player is sent to if they fail to make a choice in the time
# allotted. If None, the timeout is disabled.
default timeout_label = None
# A preference that enables or disables timed choices.
default persistent.timed_choices = True
screen choice(items):
style_prefix "choice"
vbox:
for i in items:
textbutton i.caption action i.action
if (timeout_label is not None) and persistent.timed_choices:
bar:
xalign 0.5
ypos 400
xsize 740
value AnimatedValue(old_value=1.0, value=0.0, range=1.0, delay=timeout)
timer timeout action Jump(timeout_label)
This is a pic of the launched game on the menu (that should be timed). The menu appears but not the timer.
https://docs.google.com/presentation/d/ ... slide=id.p
Thanks in advance for any help you can offer!