ID:1176851
 
(See the best response by Kaiochao.)
Code:
mob
verb
Worldsay(msg as text)
world << "[usr]: [msg]"

Say(msg as text)
world << "[usr] say: [msg]"



Problem description:I'm wondering how to make the Say verb announce to only the people in view.

This should work.

mob/verb
World_Say()
var/Text = input(src, "What would you like to say?", "World Say") as text
if(length(Text) < 2) return
world << "[src.key]: [Text]"

Say()
var/Text = input(src, "What would you like to say?", "Say") as text
if(length(Text) < 2) return
hearers() << "[src.key]: [Text]"
In response to Flysbad
Flysbad wrote:
This should work.

 mob/verb
World_Say()
var/Text = input(src, "What would you like to say?", "World Say") as text
if(length(Text) < 2) return
world << "[src.key]: [Text]"

Say()
var/Text = input(src, "What would you like to say?", "Say") as text
if(length(Text) < 2) return
oview(8) << "[src.key]: [Text]"


Don't you mean view(8)? If you use oview, it will not include the person who used the verb.
In response to Super Saiyan X
Best response
Even better would be hearers(), which only generates a list of mobs ;)