CTC problem + Background question

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
Dovahkitteh
Veteran
Posts: 229
Joined: Wed Sep 02, 2015 4:51 pm
Completed: YDD, RE, CoB, Req
Projects: Red Embrace: Hollywood, The Black Hand
Organization: Argent Games
Tumblr: argentgames
Skype: Dovahkitteh
itch: argent-games
Contact:

CTC problem + Background question

#1 Post by Dovahkitteh »

Hiya,

I'm having a small problem with the click to continue button. For some reason, it shows up fine during my NVL text, and even in ADV mode, my characters' dialogue also show it. But the narrator character that I've defined refuses to show it, for some reason.

Here's the narrator character's code:

Code: Select all

define n = Character(None, color="#c8ffc8", window_left_padding=0, yanchor=0.0, xanchor=0.0, ctc="ctc_pic", ctc_position="nestled")
and my CTC definition:

Code: Select all

image ctc_pic:
    
    #xanchor 1.0 yanchor 1.0 
    alpha 1.0 # visible
    "ctcmaybe.png"
    1.0
    alpha 0.0 # invisible
    1.0
    repeat
I get no errors, so any ideas as to why this isn't working for the narrator character?

One extra question: whenever I implement a screen shake, I can see the transparent box behind the scene. Is there anyway to just change this to a black background behind the actual picture?

Thank you very much!
Image

Writer, Programmer, Designer

Programming/Design Commissions

Image Image

User avatar
Jae
Regular
Posts: 192
Joined: Sun Sep 13, 2015 5:41 pm
Projects: Pokémon Academy Life
Location: New York, NY
Contact:

Re: CTC problem + Background question

#2 Post by Jae »

Try adding "callback=callbackcontinue" to the character.

As for the screen shake, try defining a blank black image the same size as your game's resolution and show it behind the image you're shaking.

User avatar
Donmai
Eileen-Class Veteran
Posts: 1960
Joined: Sun Jun 10, 2012 1:45 am
Completed: Toire No Hanako, Li'l Red [NaNoRenO 2013], The One in LOVE [NaNoRenO 2014], Running Blade [NaNoRenO 2016], The Other Question, To The Girl With Sunflowers
Projects: Slumberland
Location: Brazil
Contact:

Re: CTC problem + Background question

#3 Post by Donmai »

Dovahkitteh wrote:One extra question: whenever I implement a screen shake, I can see the transparent box behind the scene. Is there anyway to just change this to a black background behind the actual picture?
That transparent background is only visible while your game is in developer mode. It won't show up on the final build if you declare

Code: Select all

    config.developer = False
on your options.rpy.
Image
No, sorry! You must be mistaking me for someone else.
TOIRE NO HANAKO (A Story About Fear)

User avatar
Dovahkitteh
Veteran
Posts: 229
Joined: Wed Sep 02, 2015 4:51 pm
Completed: YDD, RE, CoB, Req
Projects: Red Embrace: Hollywood, The Black Hand
Organization: Argent Games
Tumblr: argentgames
Skype: Dovahkitteh
itch: argent-games
Contact:

Re: CTC problem + Background question

#4 Post by Dovahkitteh »

Jae wrote:Try adding "callback=callbackcontinue" to the character.
I tried that, to this effect:

Code: Select all

While running game code:
  File "game/intro.rpy", line 46, in script
    define n = Character(None, color="#c8ffc8",  ctc="ctc_pic", ctc_position="nestled", window_left_padding=0, yanchor=0.0, xanchor=0.0, callback=callbackcontinue)
  File "game/intro.rpy", line 46, in <module>
    define n = Character(None, color="#c8ffc8",  ctc="ctc_pic", ctc_position="nestled", window_left_padding=0, yanchor=0.0, xanchor=0.0, callback=callbackcontinue)
NameError: name 'callbackcontinue' is not defined

-- Full Traceback ------------------------------------------------------------

Full traceback:
  File "game/intro.rpy", line 46, in script
    define n = Character(None, color="#c8ffc8",  ctc="ctc_pic", ctc_position="nestled", window_left_padding=0, yanchor=0.0, xanchor=0.0, callback=callbackcontinue)
  File "C:\Users\pinka_000\Desktop\Misc\Gaem\Visual Novels\VN maker\renpy-6.16.3-sdk\renpy\ast.py", line 1737, in execute
    value = renpy.python.py_eval_bytecode(self.code.bytecode)
  File "C:\Users\pinka_000\Desktop\Misc\Gaem\Visual Novels\VN maker\renpy-6.16.3-sdk\renpy\python.py", line 1472, in py_eval_bytecode
    return eval(bytecode, globals, locals)
  File "game/intro.rpy", line 46, in <module>
    define n = Character(None, color="#c8ffc8",  ctc="ctc_pic", ctc_position="nestled", window_left_padding=0, yanchor=0.0, xanchor=0.0, callback=callbackcontinue)
NameError: name 'callbackcontinue' is not defined

I also tried including "callbackcontinue" in quotes, but that had no effect. D:
Donmai wrote: It won't show up on the final build if you declare

Code: Select all

    config.developer = False
on your options.rpy.
Thank you, that did indeed fix it!
Image

Writer, Programmer, Designer

Programming/Design Commissions

Image Image

User avatar
Dovahkitteh
Veteran
Posts: 229
Joined: Wed Sep 02, 2015 4:51 pm
Completed: YDD, RE, CoB, Req
Projects: Red Embrace: Hollywood, The Black Hand
Organization: Argent Games
Tumblr: argentgames
Skype: Dovahkitteh
itch: argent-games
Contact:

Re: CTC problem + Background question

#5 Post by Dovahkitteh »

Ah, I fixed the problem! Apparently in one of my other scripts, I'd defined the narrator with slightly different attributes (For some reason...). I got rid of that second definition and now it shows up the way it's supposed to.

Thanks again!
Image

Writer, Programmer, Designer

Programming/Design Commissions

Image Image

Post Reply

Who is online

Users browsing this forum: No registered users