location system with list and imagebutton
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.
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.
- Ocelot
- Lemma-Class Veteran
- Posts: 2437
- Joined: Tue Aug 23, 2016 10:35 am
- Github: MiiNiPaa
- Discord: MiiNiPaa#4384
- Contact:
Re: location system with list and imagebutton
Is there anything changing location after initial assignment?
< < insert Rick Cook quote here > >
Re: location system with list and imagebutton
well, i have map system that works, if i understand your question correctly. it works fine.
Code: Select all
screen topBAR():
imagebutton:
xpos 25
ypos 100
focus_mask True
hover "/ui/map/mapicon.jpg"
idle "/ui/map/mapicon.jpg"
action SetVariable("clickType", "mapOpen"), Return(None)
label mapNav:
$ UIreturn = renpy.call_screen("map")
if clickType == "mapCancel":
return
if clickType == "mapSelect":
$ location = UIreturn
return
screen map():
add "/ui/map/mapbg.jpg"
imagebutton:
xpos 25
ypos 100
hover "/ui/map/mapicon.jpg"
idle "/ui/map/mapicon.jpg"
action SetVariable("clickType", "mapCancel"), Return(None)
for q in Rooms:
if q.mapped:
$ TempName = "/ui/map/map_" + q.name + ".png"
imagebutton:
idle TempName
hover TempName
focus_mask True
action SetVariable("clickType", "mapSelect"), Return(q.name)
- Ocelot
- Lemma-Class Veteran
- Posts: 2437
- Joined: Tue Aug 23, 2016 10:35 am
- Github: MiiNiPaa
- Discord: MiiNiPaa#4384
- Contact:
Re: location system with list and imagebutton
Oh, I noticed the problem. You are returning q.locs, which is a list of strings, not a single string. I think, you meant to use Return(w) in imagebutton code.
< < insert Rick Cook quote here > >
Re: location system with list and imagebutton
Yes, finaly! It works! Thank you very much.
Also tnx for hinting and explainig, not just giving the answer, i learned so much.
Also tnx for hinting and explainig, not just giving the answer, i learned so much.
Who is online
Users browsing this forum: Ocelot