- Feb 27, 2019
- 181
- 225
I'm putting up Try, Exept, Finally in renpy within a init python.
But how do I manage it to jump to a renpy-label?
Here is the code.
init python:
def Day_counter():
try:
## Day declarations ##
if store.DayTime == 1:
store.DayName = "Morning"
if store.DayTime == 2:
store.DayName = "Late Morning"
if store.DayTime == 3:
store.DayName = "Noon"
if store.DayTime == 4:
store.DayName = "Afternoon"
if store.DayTime == 5:
store.DayName = "Evening"
if store.DayTime == 6:
store.DayName = "Late Evening"
if store.DayTime == 7:
store.DayName = "Night"
if store.DayTime == 8:
store.DayName = "Midnight"
if store.DayTime > 8 or store.DayTime < 1:
store.renpy.jump(Go_Back_Point)
except:
pass
config.python_callbacks.append(Day_counter)
But Renpy never jumps over to the label Go_Back_Point....
Niether "call" or "jump" works. It just ignores it.
Am I missing something?
Or do someone have a better solution to make Renpy jump to a label, when DayTime is increased over 8?
But how do I manage it to jump to a renpy-label?
Here is the code.
init python:
def Day_counter():
try:
## Day declarations ##
if store.DayTime == 1:
store.DayName = "Morning"
if store.DayTime == 2:
store.DayName = "Late Morning"
if store.DayTime == 3:
store.DayName = "Noon"
if store.DayTime == 4:
store.DayName = "Afternoon"
if store.DayTime == 5:
store.DayName = "Evening"
if store.DayTime == 6:
store.DayName = "Late Evening"
if store.DayTime == 7:
store.DayName = "Night"
if store.DayTime == 8:
store.DayName = "Midnight"
if store.DayTime > 8 or store.DayTime < 1:
store.renpy.jump(Go_Back_Point)
except:
pass
config.python_callbacks.append(Day_counter)
But Renpy never jumps over to the label Go_Back_Point....
Niether "call" or "jump" works. It just ignores it.
Am I missing something?
Or do someone have a better solution to make Renpy jump to a label, when DayTime is increased over 8?