Hey hey.
Trying to make a button I can place in the UI that allows time skipping but stays on the same label. Having an issue where the button is just returning to main menu.
This works fine when using "call changetime", but that is only when it's inside a different label.
Clicking timeskip just returns to main menu.
And for reference, this is how the buttons are built in my screen file:
Essentially, I need to create a button that is on most screens during navigation through the game world allows the player to skip time and change the dt variable +2, and stay on that label.
If I could put that button inside my m_menu screen, that would be great, but I would also be happy with something that needs to go into each label.
This is the last thing I need to fix before launching the next update to my game, so I would appreciate any help!
Thanks!
EDIT:
Also, I know it has something to do with the jump action in my button. I just don't know how to create a button that changes a variable and stays in the same label.
Trying to make a button I can place in the UI that allows time skipping but stays on the same label. Having an issue where the button is just returning to main menu.
Code:
label changetime:
$ dt += 2
if dt >= maxdt:
$ dt = 1
$ daytime = _("MORNING")
return
Code:
label mcpool:
$ hide_all1234()
show screen m_menu
scene mcbackyard
show screen img_butn4("images/buttons/timeskip.png",(0,0),"changetime")
call screen img_butn3("images/buttons/mchall_kit.png",(0,0),"mckitchen")
And for reference, this is how the buttons are built in my screen file:
Code:
screen img_butn3(img_idle, posXY, jump_place):
imagebutton:
pos (posXY)
focus_mask True
idle img_idle
hover If(action_area_lighting,true=(im.MatrixColor(img_idle,im.matrix.brightness(0.15))),false=img_idle)
action [Hide("img_butn3",transition=dissolve), If(jump_place == None, Return(1), Jump(jump_place))]
Essentially, I need to create a button that is on most screens during navigation through the game world allows the player to skip time and change the dt variable +2, and stay on that label.
If I could put that button inside my m_menu screen, that would be great, but I would also be happy with something that needs to go into each label.
This is the last thing I need to fix before launching the next update to my game, so I would appreciate any help!
Thanks!
EDIT:
Also, I know it has something to do with the jump action in my button. I just don't know how to create a button that changes a variable and stays in the same label.