ID:172072
 
Hello.

I'm trying to do two things:

1. Display team beacons
2. Display team messages

What I mean by team beacons is a little white arrow above your teammates and only them. When I try to add players to two different lists depending on what team they join, and then show the beacons and allow players to send messages to their team, the beacons and messages are only shown to oneself. So I can see my beacon and my team messages but my teammate cannot. Here's my mob code (just look at the top and the two commented areas):

/mob
var
team
list
blueteam = new /list(10)
redteam = new /list(10)
player
density = 1
Login()
world << "[usr] has connected."
team = input("-= Choose a Team =-") in list("Blue","Red")
if (team=="Blue")
world << "[usr] joined the blue team."
usr.icon = 'blue.dmi'
usr.icon_state = "standing"
usr.Move(locate(/area/blue))
blueteam += usr // This is where usr
var/image/B = image('beacon.dmi',usr) // is added to the list
blueteam << B // and beacon is shown
else
world << "[usr] joined the red team."
usr.icon = 'red.dmi'
usr.icon_state = "standing"
usr.Move(locate(/area/red))
redteam += usr
var/image/B = image('beacon.dmi',usr)
redteam << B
..()
Logout()
world << "[usr] has left the game."
del usr
verb
togglecrouch()
if (usr.icon_state=="standing")
usr.icon_state = "crouching"
else
usr.icon_state = "standing"
say(msg as text)
world << "[usr]: [msg]"
teamsay(msg as text) // And this is the team messaging
if (team=="Blue")
blueteam << "[usr] to blue team: [msg]"
else
redteam << "[usr] to red team: [msg]"


I've looked at other list questions, and I wonder if I can't simply try to output text and images directly to the list, but I'm unsure.
As for the team messages:
mob
verb
teamsay(msg as text)
if(src.team == "Blue")
for(var/atom/A in blueteam) A << "[usr] to blue team: [msg]"
else
for(var/atom/A in redteam) A << "[usr] to red team: [msg]"
And as for the "beacons", no idea.
Magicsofa wrote:
1. Display team beacons
What I mean by team beacons is a little white arrow above your teammates and only them. When I try to add players to two different lists depending on what team they join, and then show the beacons and allow players to send messages to their team, the beacons and messages are only shown to oneself. So I can see my beacon and my team messages but my teammate cannot.

If you wish to view visual affects that no-one else is able to see on your gamimg screen in game, then i suggest looking at using images. This can be found in the Dream Maker help file.

No put usr in proc. Ungh.

Lummox JR
In response to Lazyboy
Lazyboy wrote:
If you wish to view visual affects that no-one else is able to see on your gamimg screen in game, then i suggest looking at using images. This can be found in the Dream Maker help file.

Magicsofa seems to already be using images. :)
In response to Mobius Evalon
hmm...I could probably use that team messaging method for the beacons thing by using a verb. Less professional, but that's alright.

Thanks a lot for the help!
In response to Lummox JR
What's wrong with putting usr in procs?
In response to Magicsofa
There's an entire article on BYONDscape about it.
In response to Garthor
I'll read it then