This code works:
Code: Select all
default grid_pos = OrderedDict([('a1', 0), ('a2', 0), ('a3', 0), ('b1', 0), ('b2', 0), ('b3', 0), ('c1', 0), ('c2', 0), ('c3', 0)])
init python:
for x in ["idle", "hover"]:
for i in ["a1", "a2", "a3", "b1", "b2", "b3", "c1", "c2", "c3"]:
renpy.image("{0}_{1}".format(i, x), ConditionSwitch(
"grid_pos['{0}'] == 0".format(i), "images/mark_{0}.png".format(x),
"grid_pos['{0}'] == 1".format(i), "images/wood_{0}.png".format(x),
"grid_pos['{0}'] == 2".format(i), "images/steel_{0}.png".format(x)))
Code: Select all
default grid_pos = OrderedDict([('a1', 0), ('a2', 0), ('a3', 0), ('b1', 0), ('b2', 0), ('b3', 0), ('c1', 0), ('c2', 0), ('c3', 0)])
init python:
for x in ["_idle", "_hover"]:
for i in ["a1", "a2", "a3", "b1", "b2", "b3", "c1", "c2", "c3"]:
renpy.image("{0}_{1}".format(i, x), ConditionSwitch(
"grid_pos['{0}'] == 0".format(i), "images/mark{0}.png".format(x),
"grid_pos['{0}'] == 1".format(i), "images/wood{0}.png".format(x),
"grid_pos['{0}'] == 2".format(i), "images/steel{0}.png".format(x)))