Code: Select all
define e = Character("Eileen")
init:
$ test = renpy.random.randint(10,13)
$ c_p = renpy.random.randint(10, 99)
$ c_p1 = c_p +6
$ c_p2 = c_p +12
$ c_p3 = c_p +18
$ c_p4 = c_p +24
$ c_p5 = c_p +1
$ c_p6 = c_p -2
$ c_p7 = c_p -1
label start:
e "Solve this sequence for X:"
e "X [c_p1] [c_p2] [c_p3] [c_p4]"
if test == 10:
jump test1
if test == 11:
jump test2
if test == 12:
jump test3
if test == 13:
jump test4
label test1:
menu:
"[c_p5]":
jump teststop
"[c_p6]":
jump teststop
"[c_p]":
jump testgood
"[c_p7]":
jump teststop
label test2:
menu:
"[c_p]":
jump testgood
"[c_p6]":
jump teststop
"[c_p5]":
jump teststop
"[c_p7]":
jump teststop
label test3:
menu:
"[c_p5]":
jump teststop
"[c_p]":
jump testgood
"[c_p6]":
jump teststop
"[c_p7]":
jump teststop
label test4:
menu:
"[c_p5]":
jump teststop
"[c_p6]":
jump teststop
"[c_p7]":
jump teststop
"[c_p]":
jump testgood
label teststop:
e "Wrong..."
return
label testgood:
e "Great job!"
return
A question please: Each time I run it, my random correct answer [c_p] is random only at first. How can I make it random again every time without restart? Thank you in advance.