Flash sprite on screen
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.
Flash sprite on screen
Hi. I know you can flash white over the whole screen but my characters are displayed in a specific box on the screen and I ONLY want the flash to happen over that box. So I made a pain white image that's the size of that area and I want to flash this image on the screen and then immediately off again (perhaps with a fade effect to make it smoother). But I can't figure out how to do this. Can I display the image with dissolve, wait a ~0.5 sec, then have the image dissolve out, all while not pausing the text itself?
- Imperf3kt
- Lemma-Class Veteran
- Posts: 3636
- Joined: Mon Dec 14, 2015 5:05 am
- Location: Your monitor
- Contact:
Re: Flash sprite on screen
Yes, look into ATL
https://www.renpy.org/doc/html/atl.html
https://www.renpy.org/doc/html/atl.html
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project: GGD Mentor
Free Android GUI - Updated occasionally
Twitter
Imperf3kt Blackjack - a WIP blackjack game for Android made using Ren'Py
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project: GGD Mentor
Free Android GUI - Updated occasionally
Imperf3kt Blackjack - a WIP blackjack game for Android made using Ren'Py
- BioMa
- Newbie
- Posts: 9
- Joined: Mon Apr 19, 2021 12:07 pm
- Completed: Occult Rewrite
- Deviantart: Biomacchia
- itch: Biomacchia
- Discord: Biomacchia#0578
- Contact:
Re: Flash sprite on screen
You can set up your image somewhere on the code and recall it anytime you need with a simple show command.
Do something like
Bring it up on the main code with "show flash_white" anytime you want and it should have the effect you wish for, from what I've gathered.
Be sure to clear it with hide when appropriate afterwards.
Do something like
Code: Select all
image flash_white:
"/game/images/white_flash.png" with Dissolve (.5) #your image's filepath
xpos *** # the X pos of the area you want to flash white at
ypos *** # ditto for Y
pause 0.5
"/game/images/white_flash.png"
xpos ***
ypos ***
pause 0.1
"/game/images/clear.png" with Dissolve (.5) #This "clear" image is basically a completely transparent image that'll clear the last one for a smoother effect
xpos ***
ypos ***
"
Be sure to clear it with hide when appropriate afterwards.
Who is online
Users browsing this forum: No registered users
