- Sep 25, 2019
- 13
- 3
Hi guys. I once posted a question about renpy code and thanked everyone for the help. I did feel a little better about renpy. But this time I have a slightly harder question. Code to write an event, it only happens once. I mean when the "point statement" reaches a certain limit. Will open the event, or scene. For example, my point statement is 50 with John. When I entered John's room. It will show the scene. After that, all activities in John's room were back to normal. Something like "event display on first time label call only"
Here is my code. I tried this code but got the error "$ seen_tutorial is not define" And I defined "seen_tutorial" then I got "Possible infinite loop".
I tried another code
Hope everyone can help me. Thank you
Here is my code. I tried this code but got the error "$ seen_tutorial is not define" And I defined "seen_tutorial" then I got "Possible infinite loop".
Code:
$ seen_johnpoints1 = False
label johnroom:
if john_points >= 20:
jump to johnpoints1
scene johnpoints
with dissolve
if time_points in [6,7,8,9,10,11,12]:
jump morning
if time_points in [13,14,15,16,17]:
jump afternoon
if time_points in [18,19,20,21,22]:
jump evening
menu:
"Call john":
jump john1
"Do something":
jump john2
"Go out":
jump hallway
label johnpoints1:
if seen_johnpoints1:
jump johnroom
$ seen_johnpoints1 = True
scene j1
with dissolve
pause 1
scene j2
with dissolve
pause 1
........
jump johnroom
---------------> It becomes infinite. I think I saw that scene, I guess returning to the label is possible. Why "infinite loop"?
I tried another code
Code:
$ seen_johnpoints1 = False
label johnroom:
if john_points >= 20:
jump to johnpoints1
scene johnpoints
with dissolve
if time_points in [6,7,8,9,10,11,12]:
jump morning
if time_points in [13,14,15,16,17]:
jump afternoon
if time_points in [18,19,20,21,22]:
jump evening
menu:
"Call john":
jump john1
"Do something":
jump john2
"Go out":
jump hallway
label johnpoints1:
if johnpoints1.is_seen(ever=False):
jump after_tutorial
scene j1
with dissolve
pause 1
scene j2
with dissolve
pause 1
........
jump johnroom
---------------> But the label johnpoints1 repeats a circle with no exit.
Hope everyone can help me. Thank you