{Solved} Init properties for characters

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
Verstehen
Newbie
Posts: 10
Joined: Sun Sep 15, 2013 5:40 pm
Contact:

{Solved} Init properties for characters

#1 Post by Verstehen » Fri Sep 20, 2013 1:00 pm

I'm pretty sure this should be working.
I've tried moving the position of the nvl text into a certain area for a scene and it won't budge.

Code: Select all

init:
    $ narrator = Character(None, kind=nvl, xpos=0.5, ypos=1, xanchor=1.0, yanchor=1.0)
So I tried just setting its color :

Code: Select all

init:
    $ narrator = Character(None, kind=nvl, color="#8f2121")
Narrator defined speech remained the default color.
Last edited by Verstehen on Fri Sep 20, 2013 1:49 pm, edited 1 time in total.

User avatar
KomiTsuku
Eileen-Class Veteran
Posts: 1023
Joined: Mon Sep 22, 2008 11:32 pm
Completed: Dreams of the Skies, Anton's Vacation, Luka, The Halberd and The Tiger, Rising Angels, Pyrite Heart, Rising Angels: Reborn, The Halberd and The Fox, VN Tycoon, RA: Hope
Projects: Rising Angels
Organization: IDHAS Studios
IRC Nick: Komi
itch: idhas
Location: Somewhere
Contact:

Re: Init properties for characters aren't doing anything.

#2 Post by KomiTsuku » Fri Sep 20, 2013 1:14 pm

Easy fix. ^_^

Instead of putting it in the init block, just use...

Code: Select all

define narrator = Character(None, kind=nvl, xpos=0.5, ypos=1, xanchor=1.0, yanchor=1.0)
Edit: Also, you want to use what_color instead of color to change the color of the text.

Edit2: If you are just doing it for that one scene, use this right before you want it to change. After it is done, you can use the same method to change it back to whatever you wanted.

Code: Select all

$ narrator = Character(None, kind=nvl, xpos=0.5, ypos=1, xanchor=1.0, yanchor=1.0)

User avatar
Verstehen
Newbie
Posts: 10
Joined: Sun Sep 15, 2013 5:40 pm
Contact:

Re: Init properties for characters aren't doing anything.

#3 Post by Verstehen » Fri Sep 20, 2013 1:49 pm

Thanks man, it worked.

Post Reply

Who is online

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