First of all, sorry for asking so many questions here OTL
I just ran into a problem that doesn't show an error message and I can't understand why it doesn't work.
So, in my game, the player can choose the main character's outfit. I succesfully made a live composite code that doesn't crash and shows the first outfit successfully. However, when I try to change the outfit to the pajama outfit by changing the currentclothes variable to 3, it still shows the same outfit.
Code: Select all
image prince:
LiveComposite((464,1080),
(0,0), ConditionSwitch(
"prince_body == 'body1'", "images/sprites2/body1.png",
"prince_body == 'body2'", "images/sprites2/body2.png"
),
(0,0), ConditionSwitch(
"prince_expression == 'calm'", "images/sprites2/calm.png",
"prince_expression == 'happy'", "images/sprites2/happy.png",
"prince_expression == 'angry'", "images/sprites2/angry.png",
"prince_expression == 'sad'", "images/sprites2/sad.png",
),
(0,0), ConditionSwitch(
"prince_clothes == 'clothesbody1'", "images/sprites2/clothes%d.png" %currentclothes, #name all clothes that are in pose 1 clothes1, clothes2 etc
"prince_clothes == 'clothesbody2'", "images/sprites2/clothes2b%d.png" %currentclothes, #name all clothes that are in pose 2 clothes2b1 etc
"prince_clothes == 'clothesbody3'", "images/sprites2/clothes3b%d.png" %currentclothes,
"prince_clothes == 'clothesbody4'", "images/sprites2/clothes4b%d.png" %currentclothes,
),
(0,0), ConditionSwitch(
"prince_extras == 'falcon'", "images/sprites2/falcon.png",
"prince_extras == 'flower'", "images/sprites2/flower.png",
),
)
label princeclothes:
python:
currentclothes = 1
prince_expression = "calm"
prince_body = "body1"
prince_clothes = "clothesbody1"
prince_extras = "falcon"
show prince
p "I'm wearing my normal clothes."
python:
currentclothes = 3
prince_expression = "calm"
prince_body = "body1"
prince_clothes = "clothesbody1"
prince_extras = "falcon"
p "I'm wearing my pajamas!!" #except that he's not!