Hello! This might sound easy, but somehow I haven't fond a way to work this out:
Is there a way to limit a scrolling animation to a specific spot using ATL?
For example, my game has a screen that looks like this:
and I'd like to make a fog effect that looks somewhat like this example I found elsewhere
However, here, I'd like to make it so there's a fog animation that loops around only in the screen displayable area, which is easy to do if your background spans the whole screen, but here, the background is limited.
Is this possible? If there's no way around it, I could animate it by hand in the background itself, but it'll look really choppy compared to using ATL's linear command, which is the reason I'm avoiding it.
Limiting animations to a specific spot
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.
-
- Newbie
- Posts: 11
- Joined: Wed Apr 28, 2021 9:08 pm
- Projects: Occult:Rewrite
- itch: brumadev
- Location: Brazil
- Contact:
Limiting animations to a specific spot
Do you like VNs with more gameplay?
Are you interested in the paranormal?
Check out my new project Occult:Rewrite
Are you interested in the paranormal?
Check out my new project Occult:Rewrite
Re: Limiting animations to a specific spot
Immediate thought is to either crop or use AlphaMask to limit the visibility of the animated background to the viewport, but not knowing the specifics of how it's set up, hard to give concrete examples.
-
- Newbie
- Posts: 11
- Joined: Wed Apr 28, 2021 9:08 pm
- Projects: Occult:Rewrite
- itch: brumadev
- Location: Brazil
- Contact:
Re: Limiting animations to a specific spot
I see. Alphamask sounds promissing, but I'm not 100% sure of how it works. The only time I messed around with it was on the imagebutton tutorial, and the use there was a bit different. That said, an explanation of how that mechanic works would be greatly appreciated. That might be the way to go. The one written in the official documentation is a little difficult for me to follow.
As far as how the whole display is being setup, here's how it goes: Every item of the screen is an individual image using a simple image definition (except for the dialoguebox, which I believe is defined as a "screen"). The box that reads "evidence" for example is setup as
Code: Select all
# in screens script
image evidence:
"gui/UI/evidencebox.png"
xpos 0.132
ypos 0.49
# in the main script
show evidence
Code: Select all
image boatanimated:
"images/backgrounds/a/boat1.png" with Dissolve(0.5)
xalign 0.840
yalign 0.272
pause 0.5
"images/backgrounds/a/boat2.png" with Dissolve(0.5)
xalign 0.840
yalign 0.272
pause 0.5
"images/backgrounds/a/boat3.png" with Dissolve(0.5)
xalign 0.840
yalign 0.272
pause 0.5
"images/backgrounds/a/boat4.png" with Dissolve(0.5)
xalign 0.840
yalign 0.272
pause 0.5
repeat
Do you like VNs with more gameplay?
Are you interested in the paranormal?
Check out my new project Occult:Rewrite
Are you interested in the paranormal?
Check out my new project Occult:Rewrite
Re: Limiting animations to a specific spot
There are several threads on AlphaMask and AlphaBlend if you poke around the forums. From a quick glance, this looks similar to what you need: viewtopic.php?t=34323
Who is online
Users browsing this forum: Ahrefs [Bot], VESTED