But, I'm getting an error saying
And this is my arrow names
Is my code correct? What mistake am I making? Thank you very much in advance guys!
This is the script.rpy
Code: Select all
define e = Character("Eileen")
$ fightArrowActive = ["arrow_up_active", "arrow_right_active", "arrow_down_active", "arrow_left_active"]
default single_sequence_arrow_list = []
label start:
scene bg room
call arrowlabel
"shsjdsfffffffffffffffffffffff"
"jiommmmmmmmmmmop;jjjjjjjjjjjjjj"
"shsjdsfffffffffffffffffffffff"
"jiommmmmmmmmmmop;jjjjjjjjjjjjjj"
"shsjdsfffffffffffffffffffffff"
"jiommmmmmmmmmmop;jjjjjjjjjjjjjj"
"shsjdsfffffffffffffffffffffff"
"jiommmmmmmmmmmop;jjjjjjjjjjjjjj"
return
Code: Select all
label arrowlabel:
$ tmpInt = renpy.random.randint(3, 7) ## This is for deciding the number of arrows on screen
for j in range(1, tmpInt):
$ singletmpInt = renpy.random.randint(0, 3) ## This is for randomly choosing the arrows names from the fightArrowIdle List.
$ arrow_for_list = "fightArrowIdle[singletmpInt]" ## The value gets changed for every loop and the last arrow will be inside arrow_for_list at the end of loop
$ single_sequence_arrow_list.append("fightArrowIdle[singletmpInt]") ## I append the random arrows one by one to the empty list
if "arrow_for_list" == "single_sequence_arrow_list[3]": ## This is for testing whether my code is correct. If I change the number in the box bracket. Only '3' should display the text 'they match'
text "they match"
else:
text "they don't"
show screen circlescreen
return
screen arrowscreen():
hbox:
xalign 0.5
yalign 0.8
for i in single_sequence_arrow_list: ## This is to show the arrows as button
imagebutton:
idle single_sequence_arrow_list[i]
action NullAction()