Label calling messing with python loops?
Posted: Sun Oct 08, 2017 12:58 pm
Hi there,
I've been using ren'py for a while but this is the first time i can't get WTF is going on.
So, this is what i have
What is happening is that, after entering in the label "mapElement" the for loops in mapElements get completely ignored, as if the control flow is not resumed from the renpy.call function.
Moreover the line narrator("lol") is never called.
I can't use call_in_new_context because on return will cancel the shown image (although the loop works with this one).
Any idea of what is happening??
Thanks,
K
I've been using ren'py for a while but this is the first time i can't get WTF is going on.
So, this is what i have
Code: Select all
# Draw all clickable elements
label mapElements(mapType):
python:
file_loc = "image"
comm_loc = "comm"
file_ext = ".png"
# for each drawable map
for p in maps_cycle:
# for each element in the map
for i, e in enumerate(p):
renpy.call("mapElement", e=e, file_loc=file_loc, comm_loc=comm_loc, file_ext=file_ext)
narrator("Lol")
Code: Select all
label mapElement(e, file_loc, comm_loc, file_ext, use_comm=True):
if renpy.loadable(file_loc + file_ext) == True:
$file_to_load = file_loc + file_ext
show expression "[file_to_load]" as file_loc:
pos(e[MapPlaceEntry.x], e[MapPlaceEntry.y])
return
Moreover the line narrator("lol") is never called.
I can't use call_in_new_context because on return will cancel the shown image (although the loop works with this one).
Any idea of what is happening??
Thanks,
K