[SOLVED]Flipping images while using im.FactorScale

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
JeloKing
Newbie
Posts: 2
Joined: Sun Dec 05, 2021 1:22 pm
Deviantart: JeloKing
Contact:

[SOLVED]Flipping images while using im.FactorScale

#1 Post by JeloKing »

So I'm using the im.FactorScale command to get the images at the right size, I also tried to add the flip to both the image running into errors and using the flip when the character is supposed to talk, but I can't get it to flip. I don't really want to create a copy for each image/sprite because each file is ~2MB. When I try to use both commands it simply crashes. For the demo in the project group I do use it now, because we only have 3 images/sprites for the characters atm but when it's a whole story I'm feel like it will start using much more space then would be necessary.

Code: Select all

define Eva = Character (("Eva"), color="#ce7e00")
image Eva Default = im.FactorScale("images/Sprites/Busts/Eva Default.png", 0.7)

label start:
show Eva Default at right
Eva "Like this I should be facing the wrong side"
Eva flip "And like this I should be facing the right side... I am still looking at the wall however"
return
Point being in the end, how can I use both the FactorScale and Flip at the same time?
Last edited by JeloKing on Mon Dec 06, 2021 3:08 pm, edited 1 time in total.

User avatar
PyTom
Ren'Py Creator
Posts: 16096
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: Flipping images while using im.FactorScale

#2 Post by PyTom »

Don't use FactorScale anymore. Use a transform:

Code: Select all

transform flip:
     xzoom -1

show eva default at flip, right
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

JeloKing
Newbie
Posts: 2
Joined: Sun Dec 05, 2021 1:22 pm
Deviantart: JeloKing
Contact:

Re: [SOLVED]Flipping images while using im.FactorScale

#3 Post by JeloKing »

Thank you very much ^^
You decreased the game size by a whole lot :)

Post Reply

Who is online

Users browsing this forum: No registered users