I've been trying to make a code to show the character body, and the face expressions separatedelly. So, when I change an variable of the body, it will show an different skin and whenI change the mood variation, it will show an diferrent face expression. But the thing is...It's only works when I change the variable from an screen. Here is the example:
So, my problem is...When I change the variable via an imagebutton or textbutton, it works perfectly. The real problem is when I try to change the variable value from a label.
Examples:
But when I try from an textbutton:
Why is that happening? What I am doing wrong? Is there any easier way to make expression change easier? I really don't wan't to save five different images and use show and hide everytime to change the facial expression...
Python:
default mtskin = "casual"
default mood_mt = "normal"
image mt train = Composite(
(1280, 720),
(0, 0), "images/training/mt/[mtskin]_body.png", #This is for the skin change... It will search on the folder the image called casual_body.png (it will change with the variable mtskin)
(0, 0), "images/training/mt/expressions/[mood_mt].png" #This is for the facial expressions change... It works like the skin change
)
Examples:
Python:
label start:
scene bg mt
if MTMad == True:
$ mood_mt == "angry" ### It's supposed to show the angry facial expression
else:
$ mood_mt == "normal"
show mt train with moveinleft #This doesn't work for some reason....
Python:
screen test():
textbutton "change expression" action SetVariable("mood_mt", "angry")