Emote with styled text?

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
recreation
Regular
Posts: 52
Joined: Sun Jul 01, 2018 8:32 am
Contact:

Emote with styled text?

#1 Post by recreation »

I'm trying to display a emote with styled text but always get a syntax error for (here) line 4:

Code: Select all

screen emote_m:
    timer 1.0 action Hide("emote_m")
    $ store.m +=1
    text ("+1 {image=emotes_m.png}", drop_shadow=(2, 2), style="emote_S"):
    	at emote_T
    	
transform emote_T:
    yalign 0.1 #  Top.
    xalign 0.8 #  Right. 
    on show:
        alpha 0.0
        linear 1.0 alpha 1.0
    on hide:
        linear 0.5 alpha 0.0
        
style emote_S:
    size 70
    color "#fff"
    
label start:
    show screen emote_m with dissolve
Changing the line to:

Code: Select all

    text "+1 {image=emotes_m.png}" style "emote_S":
doesn't work either but droping the style completely does.
How can I style this the right way?

User avatar
Remix
Eileen-Class Veteran
Posts: 1628
Joined: Tue May 30, 2017 6:10 am
Completed: None... yet (as I'm still looking for an artist)
Projects: An un-named anime based trainer game
Contact:

Re: Emote with styled text?

#2 Post by Remix »

try:

Code: Select all

    add Text("+1 ", style="emote_S"):
        at emote_T
You will need to workaround your drop_shadow thing as that is not a part of Ren'Py.
I'd suggest using 'outlines' in the style
Frameworks & Scriptlets:

recreation
Regular
Posts: 52
Joined: Sun Jul 01, 2018 8:32 am
Contact:

Re: Emote with styled text?

#3 Post by recreation »

Thanks it works!
Outlines will do, too.
your drop_shadow thing as that is not a part of Ren'Py.
This actually worked in a older game I made with renpy, but I used it a bit differently:

Code: Select all

show expression text("some text", drop_shadow=(somevalue)...
It's a text property.

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot], Google [Bot]