| JezUK Ltd - MS Agent: Suppressing the Speech Balloon |
| << Previous | November 2003 | Next >> |
MSDN. Loathe it or, well, just loathe it I guess. It's filled to the brim with information, a lot of it either out of date or not yet useful [1], is massively disorganised, fragments related information in lots of different places, is frequently just plain wrong, and it has a crappy search facility.
MSDN is quite clear that an Agent character with a speech balloon has a speech balloon for good, and there's nothing you can do about it.
This turns out to be not quite true. You can embed tags in the text to be spoken which modify the Agent behaviour.
Most interesting is the map tag which lets you display one thing in the balloon but have something else spoken.
agent.Speak("Those Chapman brothers? What a pair of \\map=\"twats\"=\"c*nts\"\\");The tags are \ delimited, so you have to double up in C like languages.
Where it get really interesting is if you map all of the text to be spoken to nothing -
\map="all"=""\No balloon! The little bloke speaks and lip-syncs along, but no speech balloon is displayed. Yes!
agent.Speak("\\map=\"A lot of talk but no balloon\"=\"\"\\");
Now the speech bubble is not displayed, it gives a lot more room to throw up your own. Of course, you can't know animate it in the same way as the built-in one, but it's a small price to pay for the ability to put up something a bit prettier.
[1] - Right now for instance the front page barks Longhorn! Longhorn! Longhorn! Longhorn is the next version of Windows, and is due to ship sometime in 2006 or thereabouts. So yeah, loads of articles all starting This document supports a preliminary release of a software product that may be changed substantially prior to final commercial release are really, really useful right now.
[added 6th Nov 2003]
And how about formatting strings in baloon?
IMHO there is no any tool (like tag) witch allow
to force "\n" in baloon text, where it needed. [added 28th Apr 2006]
The Forest Road Reader, No 32 (1)
The Forest Road Reader, No 37 (1)
The Forest Road Reader, No 19 (1)
The Forest Road Reader, No 17 (1)