Word specific color [Twine question]

Meesteres

Member
Game Developer
Apr 25, 2018
211
130
Hi
I am trying to make a game on twine and I would like to give each charachters name a specific color. Like so:


Mary Sue: I want to tap that ass.
Mark James: I know right

Can someone help me?
 

bdsmgeek

New Member
Feb 21, 2018
10
13
Hi
I am trying to make a game on twine and I would like to give each charachters name a specific color. Like so:


Mary Sue: I want to tap that ass.
Mark James: I know right

Can someone help me?
I got you, actually had to code this up for my own game ( ), I'm currently rebating allot of the stuff so the module's/widgets and macros can be more easily found

Code:
/*  Text Coloring Widget
    Author: BDSMGeek (info@bdsmgeek.com)
    Description:
        Changes the color of inputted text to the inputted color.
    Arguments:
        $args[0] must be the desired color.
        $args[1] must be the text.
    Usage:
        <<color "red" "text">> output "text" that is red.
*/
:: Color Widget [widget nobr]
<<widget "color">><<set _colored_text to "@@color:"+$args[0]+";"+$args[1]+"@@">><<print _colored_text>><</widget>>
Just copy paste this over to a twee file or into a blank passage in Twine 2 and you can use it to color any text you put into it.

Cheers,
 

Meesteres

Member
Game Developer
Apr 25, 2018
211
130
I got you, actually had to code this up for my own game ( ), I'm currently rebating allot of the stuff so the module's/widgets and macros can be more easily found

Code:
/*  Text Coloring Widget
    Author: BDSMGeek (info@bdsmgeek.com)
    Description:
        Changes the color of inputted text to the inputted color.
    Arguments:
        $args[0] must be the desired color.
        $args[1] must be the text.
    Usage:
        <<color "red" "text">> output "text" that is red.
*/
:: Color Widget [widget nobr]
<<widget "color">><<set _colored_text to "@@color:"+$args[0]+";"+$args[1]+"@@">><<print _colored_text>><</widget>>
Just copy paste this over to a twee file or into a blank passage in Twine 2 and you can use it to color any text you put into it.

Cheers,


I'd alreadt kinda figured it out but thanks anyways