ID:268540
 
mob/red_team
icon = 'Red Team.dmi'
verb
Team_Communicate(msg as text)
set category = "Team"
/mob/red_team << "[src]: [msg]"

Whenever I use it, NO ONE hears it. Heh, as you see, I'm still a nub coder. =/
Help will be appreciated.
mob/red_team
icon = 'Red Team.dmi'
verb
Team_Communicate(msg as text)
set category = "Team"
for(var/mob/red_team/M in world)
M << "[src]: [msg]"


or

mob/red_team
icon = 'Red Team.dmi'
verb
Team_Communicate(msg as text)
set category = "Team"
for(var/mob/M in world)
if(istype(M,/mob/red_team))
M << "[src]: [msg]"


the first one means less lag and less code. the second one means slightly more lag but greater control for a different type of situation.
In response to DeathAwaitsU
Can you also make a teamsay verb using a list? Not asking for the verb, just asking if it would work.
In response to ZLegend
mob/red_team/verb/TeamSay(msg as text)
var/list/Mobs = list("")
for(var/mob/M in world)
if(istype(M,/mob/red_team))
Mobs += M
Mobs << "[src]: [msg]"
In response to DeathAwaitsU
DeathAwaitsU wrote:
> mob/red_team
> icon = 'Red Team.dmi'
> verb
> Team_Communicate(msg as text)
> set category = "Team"
> for(var/mob/red_team/M in world)
> M << "[src]: [msg]"
>


Thanks, Death, that worked. :P