mob/var/Ctype="soldier"
mob/var/Btype="alien"
mob
verb
Team_Chat(T as text)
for(var/mob/M in world)
if(M.Ctype==src.Ctype)
M<<"<font size=2><font color=green>[src.key] team says:[T]"
else
for(var/mob/N in world)
if(N.Btype==src.Btype)
N<<"<font size=2><font color=purple>[src.key] team says:[T]"
ID:171529
![]() Sep 11 2004, 9:32 am
|
|
It only works for the soldier..and when u clcik on the icons i made it so if u click on the soldier soldier=1 and alien=0 and so on..
|
![]() Sep 11 2004, 10:00 am
|
|
What would "Btype" and "Ctype" hold? You might not be doing the else statement the correct way.
|
they hold wether the mob is alien or soldier........and what is the correct way then?
|
A better way to do that would be to hold the players in lists.
var/list/players=list("aliens"=list(),"players"=list()) |
You could change the text color yourself if you really want to. I didn't give you a solution, I gave you an example.
|
It's fairly simplistic. I think you should look into more tutorials if you don't understand.
If you really want to change their colors, you could do one of two things: Give them a color variable (purple if alien, green if soldier) then put: team<<"<font size=2 color=[usr.color]>[usr.key]: [t]" Or you could use an if statement. Once again, you need some more practice. |
Your way is more confusing and gives me a few errors.Can any1 else see if they could edit or fix mine?
|
It does not give any errors if it's implemented correctly and is far more efficient than your method. Mine sends a message as quickly as sending one to world, yours loops through every mob in the world then runs if statements. You'd be far better off to find out what you're doing wrong with what I gave you than to pursue your idea.
|
and still dont i'm jsut going to stop using these forums and only use them as a last resort because some people seem to have anger issues..mabe the being on the comp to much i dunno.and i'm not pointing fingers its alot of ppl....so dont reply cuz i'm not even going to look.
|