Page 1 of 1

Can I put a say text transition in "Character"?

Posted: Thu Jul 05, 2012 11:47 pm
by Sapphi
I tried looking around, but I didn't find what I was looking for.
I'd like all my text to have the "dissolve" transition, but I would much rather put it in here:

Code: Select all

    $ t = Character(None,
                          what_font="LUCON.ttf",
                          what_style="centered_text",
                          window_style="centered_window",
                          what_size=20, 
                          what_prefix="\"",
                          what_suffix="\"",
                          what_slow_cps=0,
                          )
Rather than doing this every single line:

Code: Select all

    t "Hello, world!" with dissolve
Can it be done?

EDIT: OOOOPS, sorry mods, somehow I posted this to the wrong forum. Please forgive me! m(_ _)m

Re: Can I put a say text transition in "Character"?

Posted: Fri Jul 06, 2012 4:19 am
by Levrex
$ default_transition = dissolve

This will make every text line and menu dissolve in.

But it's "really annoying", as wiki says. And believe me, it says the truth (because you can't skip it).

Re: Can I put a say text transition in "Character"?

Posted: Fri Jul 06, 2012 7:39 pm
by Sapphi
Levrex wrote:$ default_transition = dissolve

This will make every text line and menu dissolve in.

But it's "really annoying", as wiki says. And believe me, it says the truth (because you can't skip it).
Ah, thank you.
I'm guessing the annoying-ness only applies to text that types out on the screen? If so, I think I'll manage to avoid that since I planned having the line of text appear all at once. :)

However, in the event that I do want to have certain characters' text type itself out, and certain other characters' text appear all at once with the dissolve transition, does anyone else know if there is in fact something I can put in the Character definition?

It's not a life or death matter since I can always just c/p "with dissolve" a lot, but I just want to know for this and potential future instances.

Re: Can I put a say text transition in "Character"?

Posted: Fri Jul 06, 2012 10:49 pm
by apricotorange
If you're using screens, you should be able to just hack up your say screen; use something like "show_foo = True" when you build your character, then check "foo" in the screen.

Re: Can I put a say text transition in "Character"?

Posted: Sat Jul 07, 2012 12:57 am
by Arowana
EDIT: Shoot, just found out that my code below does not work with "what_slow_cps=0," which is what Sapphi originally had. :oops: Um...why is that the case...? Sorry if I'm missing something obvious!

**

Cool! I wanted to try this out myself, so I changed the parts of my "say" screen with

Code: Select all

text what:
    id "what"
to

Code: Select all

if textdissolveon:    
    text what:
        at textdissolve #transform to dissolve in text
        id "what" 
else:
    text what:
        id "what"
where "textdissolve" is a simple transform along the lines of:

Code: Select all

transform textdissolve:
    alpha 0 #start transparent
    ease 0.5 alpha 1 #go to full opacity
Then for the Character I wanted dissolving text for, I wrote:

Code: Select all

define c = Character('C', ... , show_textdissolveon = True) 
This indeed causes the text to dissolve in for the Character in question.

However, it seems that "show_" is used to display each step of text dialogue, so if there is a {w} or {p} tag in the middle, it causes the whole screen to redissolve in after each pause. Is there a way to rewrite this code so that the text only dissolves in with each new screen, not after each {w} or {p}? I tried playing around with "callback," but haven't gotten anywhere useful.

Re: Can I put a say text transition in "Character"?

Posted: Sat Jul 07, 2012 7:10 pm
by Arowana
Sorry for the double post! Just wanted to add that after fiddling around some more, I think I may have found a better solution. Well, at least to the "what_slow_cps = 0" issue.

For whatever reason, my dissolving text code above will not work if you include "what_slow_cps=0" in the Character definition. However, it does appear to work if you delete "what_slow_cps=0" and instead add "slow_cps 0" right after "at textdissolve" on the say screen. So, uh, yay I guess? Still don't know why it makes a difference where you specify the text speed...feel free to enlighten me... :)

(Also, I realized that the way I set it up, it's inevitable the entire say screen will redissolve after each pause. Since I am applying the dissolve transform to the entire say screen, I can't just isolate the text after the pause tag. So this method would not be able to make, say, one sentence dissolve in, then the next sentence after the pause tag dissolve in separately. It's either the whole screen redissolves, or nothing redissolves. -_-)