Code: Select all
screen home_actions:
default tt = Tooltip("No button selected.")
window:
style "menu_window"
xalign 0.5
yalign 0.5
vbox:
style "menu"
spacing 2
button style "menu_choice_button":
text "Read"style "menu_choice"
action Return(actionStudy())#actionStudy()
hovered tt.Action("Read something for enjoyment.")
button style "menu_choice_button":
text "Sleep"style "menu_choice"
action NullAction()#actionStudy()
hovered tt.Action("Sleep and give not a fuck to the outside world.")
Code: Select all
label elisa_home_1_1600:
$ renpy.block_rollback()
scene bg elisa_room with fade
"Anyone home?"
ea "GAAAAHHHH"
"It feels colder than usual."
$ renpy.block_rollback()
call screen home_actions
label elisa_home_1_1700:
$ renpy.block_rollback()
scene bg elisa_room with fade
"Ughh Francesca's running late again."
"Am I smarter now? I mean my intelligence is [Elisa.intelligence]"
Code: Select all
init python:
def actionStudy():
character.stress -= int(20*(character.charisma/10))
character.intelligence += int(10+((character.intelligence*(character.charisma/10))) - (character.stress/10))
character.mana -=int(10+(character.mana *(character.charisma/10))- (character.stress/10))
character.health -=int(20+(character.mana *(character.charisma/10))- (character.stress/10))
normalize_stats()
#hour +=100
#renpy.jump(initiator+"_"+viewing_places+"_"+str(day)+"_"+str(hour))
What's happening:
The function "actionStudy()" is being executed when I just alternately hover (not clicking) on the buttons currently present on screen "home_actions". It adds more value to the stats (up to 10 digits high depending on how many times you hover it.) instead of the calculated value.
Is this a supposed bug on my code,
Addendum:
Welp even bugging the button to be purposely inactive doesn't work against it. It still adds value.
Heck it doesn't matter what button I hover over. Welp it even happens when I hover over the quick menu.
It also happened when I tried to use imagebuttons.
Edit:
Heck it's a code error on my part.