Page 1 of 1

Adding a CTC animation to custom name

Posted: Mon Oct 12, 2020 8:19 am
by chesarty
I'm wondering how to add a CTC animation to the dialogue of the player character. I can't find an easy way of doing this :(

Here's my code:

Code: Select all

$ mc = renpy.input("Your Name", length=8)
    $ mc = mc.strip()
    if mc == "":
        $ mc="MC"
        
init -1:
    $ d = Character("Damon", ctc="ctc_animation", ctc_position="fixed")
    $ a = Character("Atticus", color="#ffffff", ctc="ctc_animation", ctc_position="fixed")
    $ r = Character("Rhys", ctc="ctc_animation", ctc_position="fixed")
    $ e = Character("Enzo", ctc="ctc_animation", ctc_position="fixed")
    $ n = Character(None, ctc="ctc_animation", ctc_position="fixed")
Adding the ctc animation definition to the renpy.input line doesn't work...

Re: Adding a CTC animation to custom name

Posted: Tue Oct 13, 2020 6:32 am
by chesarty
Still can't find a solution to this.

Code: Select all

$ mc = Character("[mc]", ctc="ctc_animation", ctc_position="fixed")
This does nothing :/

Re: Adding a CTC animation to custom name

Posted: Tue Oct 13, 2020 8:39 am
by RicharDann
Characters should be defined with define statement. Also you may want to use a different variable for the character's name to avoid confusion with the character object. Try something like:

Code: Select all

define mc = Character("[mc_name]", ctc="ctc_animation")

label start:
    $ mc_name = renpy.input("Your Name", length=8)
    $ mc_name = mc_name.strip()

    mc "My name is [mc_name]!"

Re: Adding a CTC animation to custom name

Posted: Tue Oct 13, 2020 1:27 pm
by chesarty
RicharDann wrote:
Tue Oct 13, 2020 8:39 am
Characters should be defined with define statement. Also you may want to use a different variable for the character's name to avoid confusion with the character object. Try something like:

Code: Select all

define mc = Character("[mc_name]", ctc="ctc_animation")

label start:
    $ mc_name = renpy.input("Your Name", length=8)
    $ mc_name = mc_name.strip()

    mc "My name is [mc_name]!"
Thanks! That worked. Do you have any idea why it didn't work before? Before this I used define statements to define the character, but it still didn't work. From what I can see the code is the exact same one I used earlier... :| Maybe it just got confused because of the naming?

Re: Adding a CTC animation to custom name

Posted: Tue Oct 13, 2020 5:03 pm
by chesarty
Welp, now the ctc animation is gone again. I literally didn't change the code at all but it just disappeared??? Only on the mc character, too.