Side image if based on character image position?

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
User avatar
SuperbowserX
Veteran
Posts: 264
Joined: Sat Jan 07, 2017 3:09 pm
Contact:

Side image if based on character image position?

#1 Post by SuperbowserX » Tue Jun 27, 2017 11:57 pm

The way I am writing my visual novel, there are 12 different positions a character's image is supposed to be at on-screen.

There are two ways for each side (left/right) known as "left", "right", "farleft" and "farright". These are to be used when 1-2 images are to be displayed on that side of the screen.

But, when 3-4 character images are, than the four positions are "topleft", "topfarleft", "bottomleft" and "bottomfarleft" (and similarly for right).

Currently, my side image function is set up to always show the side image at one position. Is there a way I can determine which position (specifically a transform) the side image function is finding for the character?

Lemme explain a bit more. Suppose I have this code:

Code: Select all

show john happy at left with zoomin
john "Hi!"
show mary happy at right with zoomin
mary "Hi!"
The way my side image function works, both of their side images will show up in the lower-left hand corner of the screen. I want to create an if statement that basically says "if the main image is on either left, farleft, topleft, topfarleft etc.", than show the side image at this location. And then say "else if the main image is on any of the right transforms", than horizontally flip the side image at this location.

I have a feeling this might be a strain on memory but I'd like to try it. Is there anyway to determine, in the side image function, which transform the main image is being shown at?

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot]