For example:
Code: Select all
$ space = 1.0 / len(player_hand)
$ i = 0
while i < len(player_hand):
transform current_card_placement:
xalign space * (i+1)
yalign 0.5
$ card_placement = space * (i+1)
$ card_dir = "images/" + player_hand[i] + ".png"
show expression card_dir at current_card_placement as i
$ i += 1
And:
Code: Select all
python:
space = 1.0 / len(player_hand)
for i in range(len(player_hand)):
card_placement = space * (i+1)
card_dir = "images/" + player_hand[i] + ".png"
renpy.show(card_dir, at_list=[Position(xpos=card_placement, ypos=0.5)])
Is there a way to do this in renpy? Otherwise, is there a way to do this in python?