I wanted to write a script so that a character's sprite changes depending on a variable if the person playing the game makes any poor choices (Armour breaking, bruises appearing, etc). My first solution was to write
Code: Select all
show moon smile 0 at left
if moon > 0:
show moon smile 1 at left:
Code: Select all
init:
$ moon = 0
image moon smile 0 = moon_smile_0.png
image moon smile 1 = moon_smile_1.png
image moon smile 2 = moon_smile_2.png
image moon smile 3 = moon_smile_3.png
image moon smile:
choice (moon == 0):
"moon smile 0"
choice (moon == 1)
choice (moon == 02:
"moon smile 2"
"moon smile 1"
choice (moon == 3):
"moon smile 3"
I feel like there's something obvious I'm missing!! I've only started using Ren'py a few days ago though and have never really coded before. Any help