I have tried searching, but there seems to be no other mentions of this. I even tried on a fresh windows install and it still happens, so I assume I am doing something conceptually wrong, or it is a bug. Whenever I add any atl to a displayable, its position on screen will change. This can be reproduced by anyone. Open up "The Tutorial" and edit line 148 in script.rpy to
show eileen vhappy:
blur 1.0
She will move from her default position to the left side of the screen. This happens will all atl that I tested. What am I doing wrong?
Why does adding atl change a displayables position, and how to prevent it?
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.
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.
- m_from_space
- Eileen-Class Veteran
- Posts: 1031
- Joined: Sun Feb 21, 2021 3:36 am
- Contact:
Re: Why does adding atl change a displayables position, and how to prevent it?
I don't think you're doing anything wrong. I can confirm the behavior, but I don't see a problem here to be honest. It only happens if you didn't already show this image, so that the position is set in stone. For example if you add the blur to line 156, Eileen will not change her position.
Normally when you show an image/Displayable, you define where you want to show it right? When showing an image for the first time while using ATL, just make sure you define where you want it to be placed, otherwise it defaults to position x=0 and y=0.
Normally when you show an image/Displayable, you define where you want to show it right? When showing an image for the first time while using ATL, just make sure you define where you want it to be placed, otherwise it defaults to position x=0 and y=0.
Re: Why does adding atl change a displayables position, and how to prevent it?
In addition to m_from_space comment:
1) A show statement without specifying a transform uses the default transform config.default_transform
2) A show statement with a transform uses the specified transform (default transform is not used).
3) Appling transform to an image that is already shown (or replacing an image that has the same image_tag) replaces the previous transform to the new one.
(Replacing Transforms)
Note: The properties of the transform that's being replaced are inherited by the transform that's replacing it
If you want to apply an additional transform to the default one, you can do the following:
Code: Select all
show eileen vhappy at default:
blur 1.0
Code: Select all
transform blur_transform:
blur 1.0
label some_label:
show eileen vhappy at default, blur_transform
Code: Select all
show eileen vhappy
show eileen vhappy:
blur 1.0
Re: Why does adding atl change a displayables position, and how to prevent it?
_ticlock_ wrote: ↑Thu May 18, 2023 10:24 amIn addition to m_from_space comment:
1) A show statement without specifying a transform uses the default transform config.default_transform
2) A show statement with a transform uses the specified transform (default transform is not used).
3) Appling transform to an image that is already shown (or replacing an image that has the same image_tag) replaces the previous transform to the new one.
(Replacing Transforms)
Note: The properties of the transform that's being replaced are inherited by the transform that's replacing it
If you want to apply an additional transform to the default one, you can do the following:
OrCode: Select all
show eileen vhappy at default: blur 1.0
Or even:Code: Select all
transform blur_transform: blur 1.0 label some_label: show eileen vhappy at default, blur_transform
Code: Select all
show eileen vhappy show eileen vhappy: blur 1.0
Thank you. These workarounds do work.
Who is online
Users browsing this forum: Google [Bot], Silac