Texting on a phone in game formatting


Throughout my game you can use text as a verb to contact people whose numbers you have. Using the text verb plays a set dialogue depending where in the story you are. I'd like to have the texts that appear to have formatting like on a phone. How difficult would that be?

Add this to your start script:

AddExternalStylesheet("Droid Sans")

Then use CSS to change whatever element to that font family.

msg ("<p style=\"font-family:'Droid Sans-serif';\">Hello, Quest!  I am in Droid Sans-serif!</p>")

Hello, Quest! I am in Droid Sans-serif!

In this game, you can get to the Quest Forum in just a few moves:


Once you get there, you will have a Quest PX device in your inventory, complete with its own inventory pane (PX Notifications), which displays messages you have in the device, which are objects that you can click on and 'look at'.

Check it out.


Thank you! And thank you for the link. I think that is all a bit way outside my level yet. Ha. At the most basic, it would be nice if I could just have my text appear in colored boxes for each person talking. I hope that might be basic. Any chance it can be done in the editor? Do I have to use CSS?

This is the part that uses CSS: <p style=\"font-family:'Droid Sans-serif';padding:4px;border:2px solid red;text-align:center\">.

CSS is what you need to change the way your text looks.

...and you don't even have to use that AddExternalStylesheet("Droid Sans") bit. (I just discovered this. I thought we had to load that font, but it appears to be part of the default font family.)


...to use the Droid font and put a red box around the text:

Code View:

msg ("<p style=\"font-family:'Droid Sans-serif';padding:4px;border:2px solid red;text-align:center\">Hello, Quest!  I am a text from the system in Droid Sans-serif font!</p>")



Alternatively, you could keep it more simple by just changing the background and foreground colors:

Additional text adventure commands in Quest 5.7

{i:text} Displays the given text in italic.

{b:text} Displays the given text in bold. To do bold and italic, nest the commands, like this: {b:{i:very important}}.

{u:text} Displays the given text in underline.

{s:text} Displays the given text in strike-through.

{colour:colour:text} Displays the given text in the colour specified (you can also used “color”, by the way).

{back:colour:text} Displays the given text with the colour specified as the background. To show text as white on black, you can combine these like this: {colour:white:{back:black:some highlighted text}}.



I just now noticed that says "text adventure commands" instead of "text processor commands", and I use that page as a reference quite frequently...


I am a text from the system in Droid Sans-serif font!

I made an error on this very page, so I'm not one to talk!


Thank you! I will try it out : D


I'm having a bit of trouble with this. Is it possible that these just don't work with the typewriter feature in quest?

It seems that you are correct.

I can't get it to center it, and it looks a little crazy, but try this (you can adjust the CSS to your liking):

TextFX_Typewriter ("Hello, Quest!  I am a text from the system in the Droid Sans-serif font!", 100)
JS.setCss("#fx1","background:black;font-family:'Droid Sans-serif';color:red;border:1px solid red;padding:2px;font-face:bold;font-size:150%;")


The first time you use the typewriter effect, it will be #fx1. The second will be #fx2, and so on.

Not quite on topic but...

I had an experience like this yesterday texting my wife, telling her how to get data from my old phone. Go there to get the phone; it is not charged. Charge the phone; no cable. Go there to get a cable. Wait 30 minutes. Go find daughter to access phone. It felt very much like a text adventure with a long lag.


Poor Pixie! (And poor Mrs. Pixie!)

It's even more frustrating in real life, right?

(Notice how I refrained from a "lag" joke at the web player's expense? ... Darn it! I guess I didn't refrain, after all!)

This topic is now closed. Topics are closed after 60 days of inactivity.