Forums Index >> Modding >> Hotkeys for messages??



Page : <1> :


Hi, I am fairly new to TT and would like to know if it is possible to use hotkeys to display messages instead of having to type them manually. If so, I will need detailed instructions. Thanks

Tuesday, February 08, 2005 at 7:02:52 PM

Yes it is possible, no I do not know how....

 

 

 

 

Tuesday, February 08, 2005 at 7:14:06 PM

Open up the main.cs file and paste this to the bottom.

 

                                        
if (!$server::dedicated) {
moveMap.bindCmd(keyboard, "R", "", "commandToServer('messageSent', "pass!");");
}

 

For PCs the main.cs should be located in: BraveTree/ThinkTanks/Contents/Resources.

You can change the hot key and message to anything you want. Any server with team chat add "/tm" to the front of your message and only the team will see it. Good for league servers.

 

                                        
if (!$server::dedicated) {
moveMap.bindCmd(keyboard, "R", "", "commandToServer('messageSent', "/tm pass!");");
}

 

If you're interested in the number keypad, it will only let you map 1-3-7-9. 2-4-5-6-8 are already binded as driving keys.

 

                                        
if (!$server::dedicated) {
moveMap.bindCmd(keyboard, "numpad9", "", "commandToServer('messageSent', "/tm pass!");");
}

 

EDIT - Yep, the forum is deleting the 2 highlighted items below. Add those and you should be good to go.


Last edited: Wednesday, February 09, 2005 at 6:38:19 AM

Tuesday, February 08, 2005 at 9:07:39 PM

Thanks KBC, but I couldn't get it to work. Where do I put my message in the script? I assumed that the "R" meant that this was the hotkey for this script. Any suggestions?

Wednesday, February 09, 2005 at 3:56:55 AM

Email me its in my profile(just click on my name) and I will set you up ! B)

 

Wednesday, February 09, 2005 at 4:26:47 AM

Yup - there's a feature in the forum where it cuts out a character from the code that's posted. Without that character, the code won't work.

Wednesday, February 09, 2005 at 6:17:10 AM

^Right you are. I pasted a screenshot of the missing character into my post above.

Wednesday, February 09, 2005 at 6:39:47 AM

Good plan, KBC!

Wednesday, February 09, 2005 at 10:11:16 AM

Perfect, it works great now. I owe you one. Now I won't feel quite so bad when you guys steal the scrum from me!

Wednesday, February 09, 2005 at 6:31:19 PM

Page : <1> :

insert quote insert url insert email insert image bold italic underline superscript subscript horizontal rule : : Help on using forum codes

Add comment:

HTML is disabled within comments, but ZBB Code is enabled.

Back to the top

Web site designed, maintained and funded by -z- and Dan MacDonald