Problem with Click to Continue animation.

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
ShiningKnightX
Newbie
Posts: 8
Joined: Tue Jul 31, 2012 8:11 pm
Contact:

Problem with Click to Continue animation.

#1 Post by ShiningKnightX » Thu Aug 02, 2012 9:49 pm

So as the title says I'm having problems with my click to continue animation, I have the animation itself setup but the problem is with the next line of code I get (from the textbox tutorial that is).

Code: Select all

$ a = Character('Name', ctc="ctc_animation", ctc_position="fixed")
where exactly do I put this? I'm new to Ren'py and programming in general so please excuse all of my n00b questions :P. Thanks!

User avatar
Kuroneko_rg
Veteran
Posts: 294
Joined: Sat Oct 22, 2011 8:39 pm
Projects: Dark Pleasures, Kiss of Blood, Midnight Park
Organization: Black Cat Alleyway
Location: Yomi
Contact:

Re: Problem with Click to Continue animation.

#2 Post by Kuroneko_rg » Thu Aug 02, 2012 10:14 pm

You need to put that in your game script.
If you are really new with Ren'Py, then let me say it this way.

Open your script.

Look into it until you find where the character 'Eileen' is defined.

Add that line of code below 'Eileen'.

Code: Select all

$ e = Character('Eileen')
$ a = Character('Name', ctc="ctc_animation", ctc_position="fixed")

Hope I could help and don't worry, being noob is not a crime :3

User avatar
ShiningKnightX
Newbie
Posts: 8
Joined: Tue Jul 31, 2012 8:11 pm
Contact:

Re: Problem with Click to Continue animation.

#3 Post by ShiningKnightX » Thu Aug 02, 2012 10:24 pm

So just for clarification would this be correct?

Code: Select all

define k = Character('Kazuki', show_two_window=True, color="#ffffff")
$ a = Character('Kazuki', ctc="ctc_animation", ctc_position="fixed")

User avatar
Kuroneko_rg
Veteran
Posts: 294
Joined: Sat Oct 22, 2011 8:39 pm
Projects: Dark Pleasures, Kiss of Blood, Midnight Park
Organization: Black Cat Alleyway
Location: Yomi
Contact:

Re: Problem with Click to Continue animation.

#4 Post by Kuroneko_rg » Thu Aug 02, 2012 10:28 pm

No, you need to put everything on the defined character.

Code: Select all

define k = Character('Kazuki', show_two_window=True, color="#ffffff", ctc="ctc_animation", ctc_position="fixed")

User avatar
ShiningKnightX
Newbie
Posts: 8
Joined: Tue Jul 31, 2012 8:11 pm
Contact:

Re: Problem with Click to Continue animation.

#5 Post by ShiningKnightX » Thu Aug 02, 2012 10:35 pm

Okay, so I have everything as you say and I get this error.

While running game code:
File "game/script.rpy", line 22, in script
TypeError: unsupported operand type(s) for +: 'int' and 'str'

Which is a line of test text that says:

Code: Select all

k "The quick brown fox jumps over the lazy dog."
Sorry for the constant need of aid, btw. =P

User avatar
Kuroneko_rg
Veteran
Posts: 294
Joined: Sat Oct 22, 2011 8:39 pm
Projects: Dark Pleasures, Kiss of Blood, Midnight Park
Organization: Black Cat Alleyway
Location: Yomi
Contact:

Re: Problem with Click to Continue animation.

#6 Post by Kuroneko_rg » Thu Aug 02, 2012 10:42 pm

Could you post the line of code where you defined "ctc_animation"?

User avatar
ShiningKnightX
Newbie
Posts: 8
Joined: Tue Jul 31, 2012 8:11 pm
Contact:

Re: Problem with Click to Continue animation.

#7 Post by ShiningKnightX » Thu Aug 02, 2012 10:43 pm

Code: Select all

image ctc_animation = Animation("ctc1.png", "ctc2.png", "ctc3.png", "ctc4.png", "ctc5.png", "ctc6.png", "ctc7.png", "ctc8.png", "ctc9.png", "ctc10.png", "ctc11.png", xpos=1.0, ypos=1.0, xanchor=1.0, yanchor=1.0)

User avatar
Kuroneko_rg
Veteran
Posts: 294
Joined: Sat Oct 22, 2011 8:39 pm
Projects: Dark Pleasures, Kiss of Blood, Midnight Park
Organization: Black Cat Alleyway
Location: Yomi
Contact:

Re: Problem with Click to Continue animation.

#8 Post by Kuroneko_rg » Thu Aug 02, 2012 11:04 pm

It has to be an ATL block.

Code: Select all

image ctc_animation:
    "ctc1.png"
    pause 0.1
    "ctc2.png"
    pause 0.1    
    "ctc3.png"
    pause 0.1
    "ctc4.png"
    pause 0.1
    "ctc5.png"
    pause 0.1
    "ctc6.png"
    pause 0.1
    "ctc7.png"
    pause 0.1
    "ctc8.png"
    pause 0.1
    "ctc9.png"
    pause 0.1
    "ctc10.png"
    pause 0.1
    "ctc11.png"
    repeat
Tested with an animation I had and worked. Let me know if you keep having troubles.

User avatar
ShiningKnightX
Newbie
Posts: 8
Joined: Tue Jul 31, 2012 8:11 pm
Contact:

Re: Problem with Click to Continue animation.

#9 Post by ShiningKnightX » Thu Aug 02, 2012 11:07 pm

There we go! Works perfectly, thanks for all your help!

Crap, almost perfectly, how do I move it around when the code's like this?

User avatar
Kuroneko_rg
Veteran
Posts: 294
Joined: Sat Oct 22, 2011 8:39 pm
Projects: Dark Pleasures, Kiss of Blood, Midnight Park
Organization: Black Cat Alleyway
Location: Yomi
Contact:

Re: Problem with Click to Continue animation.

#10 Post by Kuroneko_rg » Thu Aug 02, 2012 11:15 pm

Mmm... beats me. I'll try again right now.

User avatar
Kuroneko_rg
Veteran
Posts: 294
Joined: Sat Oct 22, 2011 8:39 pm
Projects: Dark Pleasures, Kiss of Blood, Midnight Park
Organization: Black Cat Alleyway
Location: Yomi
Contact:

Re: Problem with Click to Continue animation.

#11 Post by Kuroneko_rg » Thu Aug 02, 2012 11:48 pm

Found it. Just add this:

Code: Select all

image ctc_animation:

    xpos 400 #Just keep changing this until you find the right spot
    ypos 400 #Just keep changing this until you find the right spot

    "ctc1.png"
    pause 0.1
    "ctc2.png"
    pause 0.1    
    "ctc3.png"
    pause 0.1
    "ctc4.png"
    pause 0.1
    "ctc5.png"
    pause 0.1
    "ctc6.png"
    pause 0.1
    "ctc7.png"
    pause 0.1
    "ctc8.png"
    pause 0.1
    "ctc9.png"
    pause 0.1
    "ctc10.png"
    pause 0.1
    "ctc11.png"
    repeat

User avatar
ShiningKnightX
Newbie
Posts: 8
Joined: Tue Jul 31, 2012 8:11 pm
Contact:

Re: Problem with Click to Continue animation.

#12 Post by ShiningKnightX » Thu Aug 02, 2012 11:50 pm

Alright, now it's perfect! Thanks for all the help again!

User avatar
Kuroneko_rg
Veteran
Posts: 294
Joined: Sat Oct 22, 2011 8:39 pm
Projects: Dark Pleasures, Kiss of Blood, Midnight Park
Organization: Black Cat Alleyway
Location: Yomi
Contact:

Re: Problem with Click to Continue animation.

#13 Post by Kuroneko_rg » Thu Aug 02, 2012 11:56 pm

It was tricky as I haven't messed up with ctc aside of the basic one, so I had to rush my way trough it.

I'm glad I could help you (I also learned a few things in the process) :3

Good luck with your project.

Post Reply

Who is online

Users browsing this forum: Google [Bot], Ocelot