Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
-
Saiffyros
- Newbie
- Posts: 13
- Joined: Sun May 21, 2017 10:13 pm
-
Contact:
#1
Post
by Saiffyros » Tue Feb 13, 2018 7:09 pm
I'm using the following code to create imagebuttons:
Code: Select all
screen test1:
grid 5 1:
xalign 0.7
yalign 0.9
spacing 20
for i in deck:
imagebutton idle i.picture:
hover i.picture2
action allies.append(i), Return("fight")
for i in range (len(deck), 5):
text Null()
It includes all the objects from the list deck to the list allies....
I wanted to include just the object that was clicked by the user.
So it generates 5 buttons and I wanted to include in the list allies, just the one that was clicked.
Not sure how I'd do that.
-
Saiffyros
- Newbie
- Posts: 13
- Joined: Sun May 21, 2017 10:13 pm
-
Contact:
#3
Post
by Saiffyros » Tue Feb 13, 2018 7:28 pm
That works perfectly. Thanks
