Click to continue icon

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
Maou Zenigame
Regular
Posts: 66
Joined: Thu Nov 09, 2017 3:09 am
Contact:

Click to continue icon

#1 Post by Maou Zenigame »

Is there a way to include a click to continue icon that will appear in all game text without having to enable it in every single character definition?

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3794
Joined: Mon Dec 14, 2015 5:05 am
itch: Imperf3kt
Location: Your monitor
Contact:

Re: Click to continue icon

#2 Post by Imperf3kt »

Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor

Twitter

Maou Zenigame
Regular
Posts: 66
Joined: Thu Nov 09, 2017 3:09 am
Contact:

Re: Click to continue icon

#3 Post by Maou Zenigame »

Alright, I popped this in and it didn't actually do anything.

Code: Select all

screen ctc():

    zorder 100
    add "gui/Textbox/emblem_ctc.png" at kaiten

transform kaiten:
    xanchor 0.5 yanchor 0.5
    subpixel True
    rotate 0
    linear 3.0 rotate 360
    repeat

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3794
Joined: Mon Dec 14, 2015 5:05 am
itch: Imperf3kt
Location: Your monitor
Contact:

Re: Click to continue icon

#4 Post by Imperf3kt »

Are you using ADV or NVL mode?
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor

Twitter

Maou Zenigame
Regular
Posts: 66
Joined: Thu Nov 09, 2017 3:09 am
Contact:

Re: Click to continue icon

#5 Post by Maou Zenigame »

ADV mode.

Maou Zenigame
Regular
Posts: 66
Joined: Thu Nov 09, 2017 3:09 am
Contact:

Re: Click to continue icon

#6 Post by Maou Zenigame »

Upon second look, it's showing up on the upper left corner of the screen.
I know how to move it with x/y coordinates, but how would I get it to show up at the end of any given line of text in the textbox?

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3794
Joined: Mon Dec 14, 2015 5:05 am
itch: Imperf3kt
Location: Your monitor
Contact:

Re: Click to continue icon

#7 Post by Imperf3kt »

In that case, use an image tag at the end of each line {image='my image.png'}
But you'd have to do it for every line manually.

You could probably add it via character callbacks, but I have no experience with that.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor

Twitter

User avatar
Milkymalk
Miko-Class Veteran
Posts: 753
Joined: Wed Nov 23, 2011 5:30 pm
Completed: Don't Look (AGS game)
Projects: KANPEKI! ★Perfect Play★
Organization: Crappy White Wings
Location: Germany
Contact:

Re: Click to continue icon

#8 Post by Milkymalk »

You can add a what_suffix for every character to append the image tag to every line a character speaks. You still need to do it for every character, but only once where you define them.
Crappy White Wings (currently quite inactive)
Working on: KANPEKI!
(On Hold: New Eden, Imperial Sea, Pure Light)

User avatar
MaydohMaydoh
Regular
Posts: 165
Joined: Mon Jul 09, 2018 5:49 am
Projects: Fuwa Fuwa Panic
Tumblr: maydohmaydoh
Location: The Satellite of Love
Contact:

Re: Click to continue icon

#9 Post by MaydohMaydoh »

Taking a look at some stuff, it seems you can use https://www.renpy.org/doc/html/config.h ... s_callback to add a ctc to every say statement.

Code: Select all

image emblem:
    'gui/Textbox/emblem_ctc.png'
    align (.5, .5)
    subpixel True
    block:
        rotate 0
        linear 3.0 rotate 360
        repeat
        
init python:
    def say_arguments_callback(who, interact=True, ctc='emblem'):
        return (), { "interact" : interact, "ctc" : ctc, "ctc_position" : "nestled" }

    config.say_arguments_callback = say_arguments_callback

Maou Zenigame
Regular
Posts: 66
Joined: Thu Nov 09, 2017 3:09 am
Contact:

Re: Click to continue icon

#10 Post by Maou Zenigame »

Thanks, that works perfectly.

Is there any way to get the indicator to show up when the text is paused with the {w} tag as well?

User avatar
MaydohMaydoh
Regular
Posts: 165
Joined: Mon Jul 09, 2018 5:49 am
Projects: Fuwa Fuwa Panic
Tumblr: maydohmaydoh
Location: The Satellite of Love
Contact:

Re: Click to continue icon

#11 Post by MaydohMaydoh »

Giving the image to ctc_pause should do the trick.

Code: Select all

return (), { "interact" : interact, "ctc" : ctc, "ctc_pause" : ctc, "ctc_position" : "nestled" }

Maou Zenigame
Regular
Posts: 66
Joined: Thu Nov 09, 2017 3:09 am
Contact:

Re: Click to continue icon

#12 Post by Maou Zenigame »

That did the trick.
Thank you so much, I've been trying to figure this out for weeks now to no avail.

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Majestic-12 [Bot]