So, I started changing parts of my code.
How it used to be: From the Study screen, button A has an action Jump("moodMath"), label moodMath does math with plenty variables, and at the end of that label is a call "afterTeaching" screen, that shows results of the math.
How I want it now: From the Study screen, button A has actions TeachingDoneMorning() and Show("afterTeaching", transition=dissolve). afterTeaching shows results of the math.
What you see below is part of the code of (what used to be) moodMath label and (what is now) TeachingDoneMorning function.
For the "if InTeachingMorning", there are 36 options, but the InTeachingMorning variable starts unselected (Value of 0).
The code basically takes a skill (Ammo skill here) then does math with your current mood, and based on that adds value to the selected skill.
Code: Select all
if InTeachingMorning == "Ammo":
skillValueOld = AmmoValue
MoodAffection = (MoodRelaxed - MoodAfraid)
if MoodAffection > 0:
MoodAffection = MoodAffection + 2
else:
pass
TeachingPoints = (MoodAffection + 6)*1.66667
AmmoValue = (skillValueOld + TeachingPoints)
AmmoValue = round(AmmoValue, 3)
skillValueNew = AmmoValue
if skillValueNew >= 100:
skillValueNew = 100It looks like the button is covering the entire screen.
There are two things my mind fails to comprehend.
ONE)
Code: Select all
action Show("emptyBranch"),TeachingDoneMorning(),Show("teaching_done_morning", transition=dissolve),Hide("study")So it has to be the actions triggering that's causing it. Triggering on every click.
But only TeachingDoneMorning() is triggering. Neither Show("emptyBranch"), nor Show("teaching_done_morning"), nor Hide("study") are trigerring.
TWO)
For the button to be clickable in the first place, two variables (InTeachingMorning and InTeachingAfternoon) have to be selected.
But in my case, I only select InTeachingMorning.
You see?
Again.
1) You can't click the button (It is under showif and doesn't meet the conditions for showif to be true).
2) The button triggers from anywhere of the screen.
3) After triggering the button, only one of it's actions triggers.
I don't understand it.