Code: Select all
screen drag_drop_screen():
# A map as background.
add "bgmarket"
python:
for i in range(0, len(inputs)):
if not (BigPuzzle.get_child_by_name("name%s"%inputs[templist[i]][1]) or (inputs[templist[i]][1] in donelist)):
print(inputs[templist[i]][1])
print(donelist)
print(templist)
BigPuzzle.add(Drag(d=Text("[inputs[%d][0]]"%templist[i], style="optioncolor"),drag_name="name%s"%inputs[templist[i]][1]))
temp2 = BigPuzzle.get_child_by_name("name%s"%inputs[templist[i]][1])
if(temp2):
temp2.snap(100,50+70*i)
if not (BigPuzzle.get_child_by_name("dropbox")):
BigPuzzle.add(Drag(d=im.Scale("postbox.png",200,400),drag_name="dropbox",draggable=False,dropped=item_dropped))
temp=BigPuzzle.get_child_by_name("dropbox")
temp.snap(900,300)
add BigPuzzle
Code: Select all
$inputs = [['Val1',0],['Val2',1],['Val3',2],['Val4',3],['Val5',4]] //Different values for different levels
python:
donelist=[]
templist=[]
inlist=[]
for i in range(0, len(inputs)): //The following loops are for making a random list from given list
inlist.append(i)
for i in range(0, len(inputs)):
mychoice = renpy.random.choice(inlist)
templist.append(mychoice)
inlist.remove(mychoice)
call screen drag_drop_screen()
stop music
"Completed Remittance Level Easy"
init python block:
Code: Select all
init python:
inputs=[]
templist=[]
donelist=[]
BigPuzzle = DragGroup()