Current Location Label [SOLVED]
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.
- yon
- Regular
- Posts: 153
- Joined: Tue Sep 09, 2014 5:09 pm
- Projects: YDSP
- Location: United States
- Contact:
Current Location Label [SOLVED]
What I'd like to do is include a label which shows the general location and specific location of the main character during normal VN segments.
The top right of the UI mockup is what I'm going for. What sort of UI setup do I need to do to have that there? I'm fine with changing the value of it whenever the scene changes.
I don't plan for it to be interactive, or clickable. I just want it to be a label.
The top right of the UI mockup is what I'm going for. What sort of UI setup do I need to do to have that there? I'm fine with changing the value of it whenever the scene changes.
I don't plan for it to be interactive, or clickable. I just want it to be a label.
Last edited by yon on Tue Nov 02, 2021 5:50 pm, edited 1 time in total.
-
rayminator
- Miko-Class Veteran
- Posts: 754
- Joined: Fri Feb 09, 2018 12:05 am
- Location: Canada
- Contact:
Re: Current Location Label
first you do this
or you can do it this way I was going post something like this
https://www.youtube.com/playlist?list=P ... z0g3mNDCuH
Code: Select all
default location = ["livingroom", "bathroom", "Kitchen"]
label start:
$ location = "livingroom"
show screen location
"I am at the livingroom."
screen location():
text "[location]"https://www.youtube.com/playlist?list=P ... z0g3mNDCuH
- yon
- Regular
- Posts: 153
- Joined: Tue Sep 09, 2014 5:09 pm
- Projects: YDSP
- Location: United States
- Contact:
Re: Current Location Label
I took what you had and it seems to work, though now I just have some transparent text hovering over part of the screen. That's okay, though. I think I can scrap something together to align it properly and set a background image.
I'm not sure which video you were referring to since your link goes to an entire playlist of videos. Thank you for the example code, though.
The only thing I'm still not sure of is how to integrate what seems to be an array for the location's default strings? I'm probably going to have to manually type in the new location label every time I need it to update, so it's fine if I just have the default set to something like blank text or "???", right?
I'm not sure which video you were referring to since your link goes to an entire playlist of videos. Thank you for the example code, though.
The only thing I'm still not sure of is how to integrate what seems to be an array for the location's default strings? I'm probably going to have to manually type in the new location label every time I need it to update, so it's fine if I just have the default set to something like blank text or "???", right?
-
felsenstern
- Regular
- Posts: 62
- Joined: Tue Jul 11, 2017 2:13 am
- Contact:
Re: Current Location Label
Not sure what he tried to achieve with the array and the following code. Because the moment when you write $ location = "livingroom" the list of ["livingroom, "bathroom", "Kitchen"] gets overwritten with a simple string.
And to position a single text line would look like:
or alternatively:
And to position a single text line would look like:
Code: Select all
screen location():
text "[location]":
xpos 400
ypos 50
Code: Select all
screen location():
text "[location]":
pos (400, 50)
---
Yes, I've Read The F*cking Manual
Yes, I've used the f*cking search function
Yes, I've used a site search
No, I don't need a reminder that search functions exist
No, I don't need your astonished outbreak that I couldn't find the information
No, I don't need your answer if you can't just give it without all the BS around it
Yes, I've Read The F*cking Manual
Yes, I've used the f*cking search function
Yes, I've used a site search
No, I don't need a reminder that search functions exist
No, I don't need your astonished outbreak that I couldn't find the information
No, I don't need your answer if you can't just give it without all the BS around it
- yon
- Regular
- Posts: 153
- Joined: Tue Sep 09, 2014 5:09 pm
- Projects: YDSP
- Location: United States
- Contact:
Re: Current Location Label
Thank you.
Who is online
Users browsing this forum: No registered users