Display Image 500px to the right or left

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
neometalero
Regular
Posts: 196
Joined: Sun Oct 23, 2016 3:51 am
Completed: My Dream Sport Dating Simulator, Attack Helicopter Dating Simulator
Projects: My Dream Sport Dating Simulator, Attack Helicopter Dating Simulator
Deviantart: neometalero
Contact:

Display Image 500px to the right or left

#1 Post by neometalero »

I need to display an image 500px to the right or left, depending on the scene.
I tried to use this code

Code: Select all

show efectUpRelacionMitad:
         xalign 500 yalign 0.0
but I dont see any changes
Any idea?
Working on many weird narrative games at Curse Box Studios
Image
https://www.curseboxstudios.com/

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3785
Joined: Mon Dec 14, 2015 5:05 am
itch: Imperf3kt
Location: Your monitor
Contact:

Re: Display Image 500px to the right or left

#2 Post by Imperf3kt »

Try adding an xanchor (half your game's width)
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor

Twitter

User avatar
PyTom
Ren'Py Creator
Posts: 16088
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: Display Image 500px to the right or left

#3 Post by PyTom »

Actually, use xpos rather than xalign. The xalign property only makes sense with fractional offsets, rather than whole numbers of pixels.
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

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Imperf3kt