I just discovered the blur function for images and want to apply it to all the backgrounds in my scenes once we get into a dialogue scene, but without having to set up code for each and every possible location. I keep all my backgrounds in a folder called 'bgs' in the image folder and they all follow the naming convention of 'bg LOCATIONNAME.jpg'. I thought I'd be clever and set up a variable called 'stloc' that would mirror that one variable aspect of the background naming convention , so it could just be plugged in to a bit of code like this:
Code: Select all
image storyback = im.Blur('bgs/bg [stloc].jpg', 1.5)
If I do it for a specific image like the 'bedroom' location:
Code: Select all
image storyback = im.Blur("bgs/bg bedroom.jpg", 1.5)