Hello! I've got two tutorials about changing sprite facial expressions using
ConditionSwitch and
TransitionShowingSwitch:
Since you're using ConditionSwitch, you need to define a side image for misha==0 in the
init block at the beginning of the script. That's probably why it's not showing a side image. Also, be careful of indentation!
For example:
Code: Select all
init:
image misha = "Misha Sprite.png"
image side misha_happy = "Misha_happy.png"
$ m = Character("Misha", color = "#ffffff", show_side_image=ConditionSwitch('misha==0', 'misha_happy', xalign=0, yalign=1.0), window_left_padding=230)
So in your script, to show the side image, you would do this:
Code: Select all
label start:
show misha
$ misha = 0
m "I'm happy!"
In the above code
show misha will make the Misha sprite appear.
$ misha = 0 will make the side image, "Misha_happy.png" appear.
The side image shows up because you have the same label defined in parentheses in the ConditionSwitch coding.
misha_happy in the ConditionSwitch matches the
misha_happy image defined in the side image,
image side misha_happy.
You can use any side image with a facial expression of Misha that you want (I like putting the facial expression in the file name to make it easy to remember what expression the image shows).
I hope this helps!