ID:151118
 
how would i make say verb where only the players on a certain z level can hear what is said
On 4/1/01 10:37 pm Haroki wrote:
how would i make say verb where only the players on a certain z level can hear what is said

You can direct the output to customized lists. For instance,

// custom say that only outputs to people on the same level as the speaker
mob/verb/say(msg as text)
var/mob/M
var/output = "[usr] says: [msg]" // the message you will output
for(M in world) // loop over all of the mobs in the world
if(M.z==usr.z) // these guys are on my level
M << output // send it to them!
In response to Tom
On 4/2/01 1:42 am Tom wrote:
On 4/1/01 10:37 pm Haroki wrote:
how would i make say verb where only the players on a certain z level can hear what is said

You can direct the output to customized lists. For instance,

// custom say that only outputs to people on the same level as the speaker
mob/verb/say(msg as text)
var/mob/M
var/output = "[usr] says: [msg]" // the message you will output
for(M in world) // loop over all of the mobs in the world
if(M.z==usr.z) // these guys are on my level
M << output // send it to them!

Tsk, tsk, Tom! That's the old-skool style!

mob/verb/say(msg as text)
var/output = "[usr] says: [msg]"
for(var/mob/M in world)
if(M.z == usr.z) M << output