How to Send a Message to a Specific Player
by Richard Bottoms · in Torque Game Engine · 03/17/2005 (3:26 am) · 4 replies
Been looking for an example of sending a message to a specific user.
For example Citizen, Citizen.1, Citizen.2 are in the game. I am Citizen and I want to send a message only to Citizen.2. How is that done please.
thx
For example Citizen, Citizen.1, Citizen.2 are in the game. I am Citizen and I want to send a message only to Citizen.2. How is that done please.
thx
#2
I tried echo ( ClientGroup.getCount() ); but it comes back 0 even when clients are connected.
03/17/2005 (4:14 am)
Looking at it right now, plus I have 3D All in One. I am trying to send a message from the console as a test but ClientGroup.getCount(); doesn't seem to work.I tried echo ( ClientGroup.getCount() ); but it comes back 0 even when clients are connected.
#3
03/17/2005 (4:20 am)
What would really be useful is being able to see a player's name and to send them a message without knowing any other ID info. Of course the back end would be where all that is figured out.
#4
ClientGroup is accessable on servers only, I believe.
03/17/2005 (5:11 am)
Add a function -- when they type /tell "poopman", use getword, if getWord(%input,0) $= "/tell", send a commandToServer to the server with "poopman" (getword(2)), then loop thru the clientlist, checking names, then sending a commandToClient to the client who will receive the message, and put the message in his chat box.ClientGroup is accessable on servers only, I believe.
Torque Owner Chris B