Game Development Community

chathud messages

by Desmond Fletcher · in Torque Game Engine · 06/03/2002 (11:39 am) · 4 replies

Can someone explain all the parameters of this function? In particular the %a1..%a10
function clientCmdChatMessage(%sender, %voice, %pitch, %msgString, %a1, %a2, %a3, %a4, %a5, %a6, %a7, %a8, %a9, %a10)
{
   onChatMessage(detag(%msgString), %voice, %pitch);
}
Thanks

#1
06/03/2002 (11:51 am)
IIRC, you can send variables along with the message, so when you catch the message it comes along with some values. For example the player X killed Y with Z
The message is sent along with the values, killed_player, killer and weapon, these are sent along using %a1, etc
#2
06/04/2002 (5:52 pm)
How would you set that script up?

%msgString = player @ %a1 @ killed player @ %a2 ....
#3
06/04/2002 (6:26 pm)
Look in game.cs, there are examples in the Torque and Realm War demos:

messageAll('MsgClientKilled','%1 takes his own life!',%this.name);
#4
06/05/2002 (10:47 am)
Many thanks!