Problem with Flip Image
Posted: Sat Nov 18, 2017 5:18 am
So, my last game had a boatload of character images for their left and right image positions. This was for the characters with outfit conditionals. The regular character images, I could use Image Flip fine.
So my code for my Party Members looks like this:
While my code to change the image to work in battles looks like this:
I have no issues with the images in battles, I'm just showing that code because it may be related to my real problem/question.
When I write:
It comes back with the error:
My goal is to somehow find code that allows for Image Flip with Conditionals so that I don't need to stuff my images folder with so many redundant images.
So my code for my Party Members looks like this:
Code: Select all
#APOCALYPSE BUNNY
default bunny_outfit = "c1"
define ab = Character('Apocalypse Bunny', color="#FF3D3D",show_two_window=True)
image bunny shock = "2_4_[bunny_outfit]_2.png"
image bunny shock LFT = "2_4_[bunny_outfit]_1.png"
image bunny angry = "2_2_[bunny_outfit]_2.png"
image bunny angry LFT = "2_2_[bunny_outfit]_1.png"
image bunny hurt = "2_3_[bunny_outfit]_2.png"
image bunny hurt LFT = "2_3_[bunny_outfit]_1.png"
image bunny happy = "2_1_[bunny_outfit]_2.png"
image bunny happy LFT = "2_1_[bunny_outfit]_1.png"
image bunny sad = "2_2a_[bunny_outfit]_2.png"
image bunny sad LFT = "2_2a_[bunny_outfit]_1.png"
Code: Select all
"{color=#FFFF00}Outfit: {color=#08E836}New Clothes":
if persistent.ng is False:
call cthulhu
$globalClock.AddTime(0, 1, 5)
jump closet
else:
if change_perry:
if boy:
$perry.image = "1_5_male_" + perry_outfit
else:
$perry.image = "1_5_fem_" + perry_outfit
$perry.image_path = "images/" + perry.image + ".png"
When I write:
Code: Select all
image bunny hurt LFT = im.Flip("2_3_[bunny_outfit]_1.png", horizontal=True)
Code: Select all
IOError: Couldn't find file '2_3_[bunny_outfit]_1.png'.