Refresh Current Label/Return Previous Label
Posted: Tue Jun 19, 2018 2:03 am
Hello.
I have a few image buttons that take you to different locations in the game. Depending on the time of day, a different screen will be called that shows a hotbutton (person) in that location.
So for example, in the Park at 12pm you see the hotbutton that lets you talk to Mark. At 1pm, a hotbutton appears that lets you talk to Stacy. I have a time function which acts like an in-game clock which is displayed on a separate screen at all times. So far so good.
I also have a button on a screen that allows me to fast forward time by 30 minutes. If I'm in the label at 12pm and see Mark, but decide I want to talk to Stacy instead, I can skip ahead 1 hour to have her appear. However if I do skip ahead, she will not appear. The only way to make it work is to click on the Park hotbutton again to 'refresh' the screen that shows the character hotbutton.
SKIP TIME BUTTON
passtimecurry is my in-game clock function.
I know how to call/hide a screen. I have dozens of these hotbutton screens for each character/situation so I'm not sure how to write a catch-all scenario. The game still works just fine, but it's an inconvenience I would like to fix. Is there a way to make the current label 'refresh'? Any ideas on where I should start?
Thank you once again.
I have a few image buttons that take you to different locations in the game. Depending on the time of day, a different screen will be called that shows a hotbutton (person) in that location.
So for example, in the Park at 12pm you see the hotbutton that lets you talk to Mark. At 1pm, a hotbutton appears that lets you talk to Stacy. I have a time function which acts like an in-game clock which is displayed on a separate screen at all times. So far so good.
Code: Select all
label Park:
scene background
if 12 <= TIMEVARIABLE < 13:
call screen mark_button
if 13 <= TIMEVARIABLE < 14:
call screen stacy_button
SKIP TIME BUTTON
Code: Select all
imagebutton: #+30 min
xpos 75
ypos -30
focus_mask True
auto "gui/icons/30m_icon_%s.png" hovered tt.Action("+ 30 mins") action(passtimecurry(30), Show("ui_text"))
I know how to call/hide a screen. I have dozens of these hotbutton screens for each character/situation so I'm not sure how to write a catch-all scenario. The game still works just fine, but it's an inconvenience I would like to fix. Is there a way to make the current label 'refresh'? Any ideas on where I should start?
Thank you once again.