CTCF and Side_Image(RESOLVED + New question!)

A place to discuss things that aren't specific to any one creator or game.
Forum rules
Ren'Py specific questions should be posted in the Ren'Py Questions and Annoucements forum, not here.
Post Reply
Message
Author
Ruru
Newbie
Posts: 6
Joined: Fri Jan 30, 2009 1:31 am
Projects: Static Voice
Contact:

CTCF and Side_Image(RESOLVED + New question!)

#1 Post by Ruru » Fri Jan 30, 2009 3:12 am

I'm still kinda noobish when it comes to more complex things in Ren'Py (if by noobish you mean dabbling for a few years but never doing much), so I have a question for the masses.

I want to use the code for the "click to continue (fixed)" (ctcf) along with the "side_image" code, so I can have the blinking cursor in the lower right along with the image of the character. I'm not sure how to go about this, so I'm hoping someone can show me the way :3
This is the code I'm using for the "side_image".

Code: Select all

    $ s = Character('Saya',
                        color="#BEE6363",
                        window_left_padding=160,
                        show_side_image=Image("saya_side.png", xalign=0.0, yalign=0.0))
and this is the one I'm using for the "ctcf"

Code: Select all

    $ ctcf = Character('Saya',
                        color="#BEE6363",
                        ctc=anim.Filmstrip("blink.png", (20, 20), (2, 1), .30, xpos=760, ypos=560, xanchor=0, yanchor=0),
                        ctc_position="fixed")
Thanks in advance!
Last edited by Ruru on Fri Jan 30, 2009 4:26 am, edited 1 time in total.

User avatar
JQuartz
Eileen-Class Veteran
Posts: 1265
Joined: Fri Aug 31, 2007 7:02 am
Projects: 0 completed game. Still haven't made any meaningfully completed games...
Contact:

Re: CTCF and Side_Image at the same time?

#2 Post by JQuartz » Fri Jan 30, 2009 3:35 am

This should work. I changed the color cause it was giving an error. Make necessary adjustments to the color if you don't like the color.

Code: Select all

$ s = Character('Saya',
                        color="#BEE636",
                        ctc=anim.Filmstrip("blink.png", (20, 20), (2, 1), .30, xpos=760, ypos=560, xanchor=0, yanchor=0),
                        ctc_position="fixed",window_left_padding=160,show_side_image=Image("saya_side.png", xalign=0.0, yalign=1.0))
I suspect somebody is stealing my internet identity so don't believe everything I tell you via messages. I don't post or send messages anymore so don't believe anything I tell you via messages or posts.

Ruru
Newbie
Posts: 6
Joined: Fri Jan 30, 2009 1:31 am
Projects: Static Voice
Contact:

Re: CTCF and Side_Image at the same time?

#3 Post by Ruru » Fri Jan 30, 2009 3:56 am

Successfully implemented. Thanks for the help!

Also, do you have any idea why the windows pile atop eachother after I use the "centered" code?

Code: Select all

    show black
    with dissolve

    centered "Chapter 1"
    
    hide black
    with dissolve
Everything after seems to pile up like so:
Image

User avatar
monele
Lemma-Class Veteran
Posts: 4101
Joined: Sat Oct 08, 2005 7:57 am
Location: France
Contact:

Re: CTCF and Side_Image(RESOLVED + New question!)

#4 Post by monele » Fri Jan 30, 2009 4:37 am

Try "scene black" instead, and make sure black is something like "Solid((0,0,0,255))".

The "pile up" is due to there not being any background (which is not obvious because no background = black too)

Ruru
Newbie
Posts: 6
Joined: Fri Jan 30, 2009 1:31 am
Projects: Static Voice
Contact:

Re: CTCF and Side_Image(RESOLVED + New question!)

#5 Post by Ruru » Fri Jan 30, 2009 4:52 am

I'm not sure I get what you mean...
Would I define this as a scene as well? And if so, what would be the best way to go about it?

Also, would this issue be resolved when a background is implemented?

User avatar
Jake
Support Hero
Posts: 3826
Joined: Sat Jun 17, 2006 7:28 pm
Contact:

Re: CTCF and Side_Image(RESOLVED + New question!)

#6 Post by Jake » Fri Jan 30, 2009 7:56 am

Ruru wrote:I'm not sure I get what you mean...
Would I define this as a scene as well? And if so, what would be the best way to go about it?
Think of it this way - the Ren'Py window is a canvas, and the program paints on it. Every time something changes, it needs to paint from the back upwards - so normally it starts by painting your background, then it paints your characters over the top of the background, then it paints your text box over the characters and then your text over the top of the text box.

The canvas is black before you start, so if you don't set a background, then it starts out black and the first time you display anything, it looks fine. But the next time the scene changes, it goes to paint the background and finds you don't have one, so it just skips that and leaves the whole screen as it was before. Then it paints your characters over the top of your old characters+textbox+text, then it paints your textbox over the top of that, and finally your text... but if there's any places where you would have been able to see through to the background, you'll be able to see through to whatever was on the canvas previously instead. The default text box is semi-transparent, so you can half-see through it to the text that was on the screen before.

If you want a black background, then even though the canvas starts off black by default, you have to set the background to black. If you don't, that black won't get repainted every time anything changes, and you'll keep seeing past the non-existent background to what was there before. So yes, if you set a background (with the 'scene' command) then it'll solve your problem.



'show' is the command Ren'Py uses to show character sprites (and other things on the same level as character sprites). These are added to the current scene, so they're all drawn each time it needs to redraw something.

'scene' changes the scene, and it does so by doing two things. Firstly, it changes the current background to whatever you specify, so "scene black" would change the current background to the solid black BG which I'm pretty sure is set up in the default project (see options.rpy). The second thing it does is remove all of your 'show'n characters, because it's a different scene and the characters were added to the old scene.
Server error: user 'Jake' not found

User avatar
Megaman Z
Miko-Class Veteran
Posts: 829
Joined: Sun Feb 20, 2005 8:45 pm
Projects: NaNoRenO 2016, Ren'Py tutorial series
Location: USA
Contact:

Re: CTCF and Side_Image(RESOLVED + New question!)

#7 Post by Megaman Z » Fri Jan 30, 2009 12:32 pm

BTW, the error from the color (in your original posted script) was due to you having something similar to the following (syntax-wise) in your color specification:

Code: Select all

#rrggbba
this isn't permitted. valid color definitions must be one of the following forms:

Code: Select all

"#rgb"
"#rgba"
"#rrggbb"
"#rrggbbaa"
(r,g,b)
(r,g,b,a)
where r is red (either in hex or (in tuple notation) a value from 0-255), g is green, b is blue, and a is alpha (#F, #FF, or 255 if not specified - aka "FULLY OPAQUE")

just in case you run into that error again.
~Kitsune Zeta

Post Reply

Who is online

Users browsing this forum: No registered users