Implement a flash behind character image?

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: 270
Joined: Sat Jan 07, 2017 3:09 pm
Contact:

Implement a flash behind character image?

#1 Post by SuperbowserX »

Let me explain. All of my character sprite images are the same size. For quite a while now, I've been handling showing a change of emotion by just showing a small speech bubble with an exclamation mark in it over their heads. However, I think an easier way to do this would be to have a flashing white box appear over their current position with a lower zorder than them.

Here is my current code structure (with comments):

Code: Select all

            transform left:
                size(137, 149) xpos 0.24 xanchor 0.5 ypos 0.45 yanchor 0.5
                # the above would be used by say, the line of code "show derek happy at left with zoomin"

            label faceleft:
                show screen face(0.24, 0.27, 1.0) #for the 
                return
                #after you show a different image for the same character, you would use the following 2 lines of code in succession:
                #show derek angry at left
                #call faceleft
                
        screen face (x, y, z):
            modal False
            add 'delta.png' xalign x yalign y xzoom z at pop_fade
            timer 0.1 action Hide('face')
            #delta.png is the image indicating a speech bubble. For each label, coordinates that place it precisely above the character's head are used; the z argument is simply a -1 used for all the transforms on the right side of the screen.
            
Now, when I tried putting "zorder 100" for a position (i.e. the transform left position), the game complains that "zorder" isn't a valid child for the transform. So my question here is; how can I show a square, white flash of light behind a character (that doesn't obstruct the character) that pops in and out (used to indicate changed expression)?

User avatar
Scribbles
Miko-Class Veteran
Posts: 636
Joined: Wed Sep 21, 2016 4:15 pm
Completed: Pinewood Island, As We Know It
Projects: In Blood
Organization: Jaime Scribbles Games
Deviantart: breakfastdoodles
itch: scribbles
Location: Ohio
Contact:

Re: Implement a flash behind character image?

#2 Post by Scribbles »

hmmm, you can try using "behind", maybe you could accomplish it with screens? so then call the screen when their emotions change and layer the screen below the spirtes? I'm not sure how you would do that though, but maybe it'll give you an idea > < hopefully someone else can help you better :)
Image - Image -Image

Post Reply

Who is online

Users browsing this forum: Google [Bot], IrisColt