Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Basic variable-setting questions

Sorry for the dumb/obvious question, but I want to set a variable called, say, $purpandboldandimpact to make anything it's attached to purple, bold, and in impact font.

I know how to do any one of those things individually -- (set: $purp to (colour: red + blue)) works fine -- but I can't seem to figure out how to set up a variable to include multiple macros.


Comments

  • You can combine the changers returned by style commands together using a plus (+) character, similar to how you add numbers together.

    In this case you want to combine a (text-colour: ) macro aka (colour:) with a (text-style: ) macro and a (font: ) macro.
    (set: $kate to (colour: red + blue) + (text-style: "bold") + (font: "impact"))
    $kate[Hello my name is Kate!]
    
    notes:
    1. In your example you named the variable $purpandboldandimpact because it's value can be used to change text to be purple-and-bold-and-impact but it would be a better idea to name it based on it's usage or purpose, which in my example was to style dialogue spoken by Kate.

    2. The (font:) macro can only use fonts that the Reader's web-browser knows about, which generally defaults to a sub-set of the ones their Operating System has installed. If you want to use a font that is not one of the standard ones you will need to use code to include it in your story, one way to do this is mentioned in the How Do I Change The Font thread.
  • Thank you so much!
Sign In or Register to comment.