Welcome Guest ( Login | Register )


All times are UTC - 5 hours



Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Sun Aug 20, 2006 9:22 pm   Post subject: Sound in join message?

Joined: Aug 20, 2006
Posts: 1
Does anyone have a tutorial on how to add a sound fx to a join message?
I wanted to have it where the player joined the game and it said Welcome, but I can't figure out how to make tribes2 play the sound fx when a player joins.


Top
 Profile  
 
PostPosted: Mon Aug 21, 2006 10:28 am
User avatar

Joined: Jun 09, 2004
Posts: 131
Location: The Milkyway
If you want it done when they connect, open server.cs and find the GameConnection::onConnect function and search through it for all of the messageClient(%client, 'MsgClientJoin' calls and add ~wpath/to/sound.wav.. an example being
messageClient(%client, 'MsgClientJoin', '\c2Welcome to Tribes2 %1.~wfx/environment/ctmelody2.wav', ...


otherwise, if you don't want to find and replace all of them, you could use a package or simply add this line to the end of the GameConnection::onConnect function
messageClient(%client, 'MsgClient', "~wPath/to/sound.wav");


In case you haven't figured it out by now, you must prefix a sound (when sent via messages) with the "~w" characters. T2 searches for those to identify whether it should play a sound with the message or not.
Also, there are several predefined message "types", such as 'MsgAdminForce', which are preset to play sounds, like the gong sound in case of 'MsgAdminForce'.

_________________
while(true)
   break;


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 5 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum


Search for:
Jump to:  
cron