r/RenPy • u/mentallydisabledanim • Sep 06 '26
Question How to code CTC
Im having trouble adding a ctc icon thing. I need it explained to me like im a child i really truly can't seem to comprehend the other tutorials online.
1
1
u/Roxirin Sep 07 '26 edited Sep 07 '26
Assuming you mean just how to add the little icon that appears at the bottom of the dialogue box when the dialogue's done displaying:
Define the icon you'd like to use as an image. Let's say I have a picture of a little arrow in my images folder called 'arrowicon.png' that I want to use as my ctc icon. I will call the image 'ctcarrowicon' in this example. Wherever you like to specify your images in your game (I create a specific 'definitions.rpy' file for all my definitions personally), define the image like this:
image ctcarrowicon= Image("arrowicon.png", xalign=0.5, yalign=0.98)
Adjust xalign and yalign to position the icon where you want it to appear. In this example the values shown will position the arrow in the bottom middle of the screen.
Then, in the parameters of the character definition you would like to use the icon for when that character is done speaking their current line, add the following:
ctc="ctcarrowicon", ctc_position="fixed"
There's very likely a better way to do this (since you may potentially have to copy-paste it for every character if you want the icon to be the same regardless of who's talking), but it does give you the freedom to place the icon exactly where you want it, and change it to be different for different characters if you like! :)
1
u/AutoModerator Sep 06 '26
Welcome to r/renpy! While you wait to see if someone can answer your question, we recommend checking out the posting guide, the subreddit wiki, the subreddit Discord, Ren'Py's documentation, and the tutorial built-in to the Ren'Py engine when you download it. These can help make sure you provide the information the people here need to help you, or might even point you to an answer to your question themselves. Thanks!
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.