Fortress Forever

Go Back   Fortress Forever > Community > Tips and Tutorials

Reply
 
Thread Tools Display Modes
Old 01-11-2008, 01:39 AM   #1
Dr.Satan
Wiki Team
Fortress Forever Staff
 
Dr.Satan's Avatar
 
Join Date: Sep 2007
Location: Greeley, CO
Class/Position: Med / Solly
Gametype: PAYLOAD
Affiliations: DET-
Posts Rated Helpful 19 Times
Name Announcement Script

For all you guys who want your name announcements back from TFC here's the best I can get you:

Code:
//Script by Dr.Satan
//Put in your autoexec.cfg 

//     -----
//---- Names ----
//     -----

alias demo_n "say_team Now playing demo!"
alias engy_n "say_team Now playing engy"
alias hw_n "say_team Now playing hw!"
alias med_n "say_team Now playing medic!"
alias pyro_n "say_team Now playing pyro!"
alias scout_n "say_team Now playing scout!"
alias sniper_n "say_team Now playing sniper!"
alias solly_n "say_team Now playing solly!"
alias spy_n "say_team Now playing spy!"

//Change rightarrow to your desired key

//put in demoman.cfg
bind rightarrow "demo_n"

//put in engineer.cfg
bind rightarrow "engy_n"

//put in hwguy.cfg
bind rightarrow "hw_n"

//put in medic.cfg
bind rightarrow "med_n"

//put in pyro.cfg
bind rightarrow "pyro_n"

//put in scout.cfg
bind rightarrow "scout_n"

//put in sniper.cfg
bind rightarrow "sniper_n"

//put in soldier.cfg
bind rightarrow "solly_n"

//put in spy.cfg
bind rightarrow "spy_n"
enjoy
__________________
(Released) conc_school | hellion_classic | ksour_PAYLOAD | mulch_faf
(Beta) alchimy_b1
(Lua) base_payload_2015
(Models) props_trainyard
Support FF:
Dr.Satan is offline   Reply With Quote


Old 01-17-2008, 09:13 PM   #2
Damascus
Comic Artist
D&A Member
 
Damascus's Avatar
 
Join Date: Jan 2008
Posts Rated Helpful 0 Times
TFC had name announcements?

ah, well. Don't you need the sound files for them?
Damascus is offline   Reply With Quote


Old 01-21-2008, 05:23 PM   #3
Dr.Satan
Wiki Team
Fortress Forever Staff
 
Dr.Satan's Avatar
 
Join Date: Sep 2007
Location: Greeley, CO
Class/Position: Med / Solly
Gametype: PAYLOAD
Affiliations: DET-
Posts Rated Helpful 19 Times
No...this is to announce to your team what class you are playing. Most clan players used something like this for all of their classes, but with the .cfg's executing on each spawn you haven't been able to. Had a request to make one so I did!
__________________
(Released) conc_school | hellion_classic | ksour_PAYLOAD | mulch_faf
(Beta) alchimy_b1
(Lua) base_payload_2015
(Models) props_trainyard
Support FF:
Dr.Satan is offline   Reply With Quote


Old 02-07-2008, 07:58 PM   #4
Dr.Satan
Wiki Team
Fortress Forever Staff
 
Dr.Satan's Avatar
 
Join Date: Sep 2007
Location: Greeley, CO
Class/Position: Med / Solly
Gametype: PAYLOAD
Affiliations: DET-
Posts Rated Helpful 19 Times
New Script same idea...

Use Key pad enter to activate the menu, then press the coresponding number on the key pad for the class announcement you desire.

Code:
//     -----
//---- Names ----
//     -----

alias demo_n "say_team Now playing demo!; u_all"
alias engy_n "say_team Now playing engy; u_all"
alias hw_n "say_team Now playing hw!; u_all"
alias med_n "say_team Now playing medic!; u_all"
alias pyro_n "say_team Now playing pyro!; u_all"
alias scout_n "say_team Now playing scout!; u_all"
alias sniper_n "say_team Now playing sniper!; u_all"
alias solly_n "say_team Now playing solly!; u_all"
alias spy_n "say_team Now playing spy!; u_all"

alias namebind "bind KP_END scout_n; bind KP_DOWNARROW sniper_n; bind KP_PGDN solly_n; 
bind KP_LEFTARROW demo_n; bind KP_5 medic_n; bind KP_RIGHTARROW hw_n; bind KP_HOME pyro_n; 
bind KP_UPARROW spy_n; bind KP_PGUP engy_n; echos"

alias echos "echo 1) Scout; echo 2) Sniper; echo 3) Soldier; echo 4) Demoman; echo 5) Medic;
 echo 6) HWGuy; echo 7) Pyro; echo 8) Spy; echo 9) Engineer"

alias u_all "unbind KP_END; unbind KP_DOWNARROW; unbind KP_PGDN; unbind KP_LEFTARROW;
 unbind KP_5; unbind KP_RIGHTARROW; unbind KP_HOME; unbind KP_UPARROW; unbind KP_PGDN"

bind KP_ENTER "namebind"
__________________
(Released) conc_school | hellion_classic | ksour_PAYLOAD | mulch_faf
(Beta) alchimy_b1
(Lua) base_payload_2015
(Models) props_trainyard
Support FF:
Dr.Satan is offline   Reply With Quote


Old 02-07-2008, 09:17 PM   #5
bokko
when ff will out?
D&A Member
 
Join Date: Mar 2007
Posts Rated Helpful 0 Times
Just a thought here, so you want a command that is executed the first time you spawn as a new class? Couldn't you just put this part in autoexec:
Code:
alias demo_n "say_team Now playing demo!"
alias engy_n "say_team Now playing engy"
alias hw_n "say_team Now playing hw!"
alias med_n "say_team Now playing medic!"
alias pyro_n "say_team Now playing pyro!"
alias scout_n "say_team Now playing scout!"
alias sniper_n "say_team Now playing sniper!"
alias solly_n "say_team Now playing solly!"
alias spy_n "say_team Now playing spy!"
Then edit the class cfg's, using scout.cfg as an example:
Code:
scout_n

alias demo_n "say_team Now playing demo!"
alias engy_n "say_team Now playing engy"
alias hw_n "say_team Now playing hw!"
alias med_n "say_team Now playing medic!"
alias pyro_n "say_team Now playing pyro!"
alias scout_n ""
alias sniper_n "say_team Now playing sniper!"
alias solly_n "say_team Now playing solly!"
alias spy_n "say_team Now playing spy!"
That way scout_n is executed once according to autoexec.cfg or another class cfg, then defined as blank so it isn't repeated. The other class specific messages are all reset to their original form in case the previous class config used had defined it's corresponding message as blank.
bokko is offline   Reply With Quote


Old 02-07-2008, 09:39 PM   #6
Dr.Satan
Wiki Team
Fortress Forever Staff
 
Dr.Satan's Avatar
 
Join Date: Sep 2007
Location: Greeley, CO
Class/Position: Med / Solly
Gametype: PAYLOAD
Affiliations: DET-
Posts Rated Helpful 19 Times
yeah...but I think your confusing the 2 scripts:

The first one has a line that needs to be placed into each <classname>.cfg and has rightarrow bound to exec the command.

The second one would all just be placed into the userconfig.cfg. It binds the key pad enter to bind the 1, 2, 3, 4, 5, 6, 7, 8, and 9 keys to the <class>_n alias. That way if you press enter, then 2 it would do the sniper announcement and unbind the key pad keys back to nothing.

EDIT: Ok so i re-read your post and was wrong...

Quote:
Just a thought here, so you want a command that is executed the first time you spawn as a new class? Couldn't you just put this part in autoexec:
Not really. The issue is that in TFC you were able to set up announcements for each class that would only go off when you first picked the class...this was b/c the <classname>.cfg only executed once.

But with FF the <classname>.cfg's execute everytime you spawn. So to get around that and still be able to alert your team when you change classes but not every time you die.

Your way totally would have worked for TFC, but doesn't in FF and that's the issue. Cept you made it more complicated then needed. Really you could have just put the aliases into the userconfig.cfg and then put scout_n, demo_n, etc. after the exec userconfig.cfg line and it would have worked fine.

Also personally I don't use it, but I had a fellow clan member request it so I figured I may as well make it public.
__________________
(Released) conc_school | hellion_classic | ksour_PAYLOAD | mulch_faf
(Beta) alchimy_b1
(Lua) base_payload_2015
(Models) props_trainyard
Support FF:

Last edited by Dr.Satan; 02-07-2008 at 09:49 PM.
Dr.Satan is offline   Reply With Quote


Old 02-08-2008, 06:34 PM   #7
bokko
when ff will out?
D&A Member
 
Join Date: Mar 2007
Posts Rated Helpful 0 Times
Quote:
Originally Posted by Dr.Satan
Not really. The issue is that in TFC you were able to set up announcements for each class that would only go off when you first picked the class...this was b/c the <classname>.cfg only executed once.
Then my script should work in theory, I haven't actually tested it.
You have message aliases for each class like in your script defined in a config loaded everytime you start up FF.
The message alias for the corresponding class config is executed at the start of the config file.
It is then defined as null, so the next time the class config is loaded the alias will do nothing.
All the message aliases are then redefined exluding the message alias of the current class which stays defined as null.
Without redefining the class message aliases they would all end up being defined as null and hence not do anything.
bokko is offline   Reply With Quote


Old 02-08-2008, 07:38 PM   #8
Dr.Satan
Wiki Team
Fortress Forever Staff
 
Dr.Satan's Avatar
 
Join Date: Sep 2007
Location: Greeley, CO
Class/Position: Med / Solly
Gametype: PAYLOAD
Affiliations: DET-
Posts Rated Helpful 19 Times
Quote:
Originally Posted by bokko
Then my script should work in theory, I haven't actually tested it.
You have message aliases for each class like in your script defined in a config loaded everytime you start up FF.
The message alias for the corresponding class config is executed at the start of the config file.
It is then defined as null, so the next time the class config is loaded the alias will do nothing.
All the message aliases are then redefined exluding the message alias of the current class which stays defined as null.
Without redefining the class message aliases they would all end up being defined as null and hence not do anything.
It would...but there is no way to exec. the userconfig.cfg and then NOT execute it next time...unless you alias something to execute that and then alias it back to blank...actually you know what that might actually work.

Imma have to get back to you on this one, but I think you might actually be a genius!
__________________
(Released) conc_school | hellion_classic | ksour_PAYLOAD | mulch_faf
(Beta) alchimy_b1
(Lua) base_payload_2015
(Models) props_trainyard
Support FF:
Dr.Satan is offline   Reply With Quote


Old 02-08-2008, 10:38 PM   #9
bokko
when ff will out?
D&A Member
 
Join Date: Mar 2007
Posts Rated Helpful 0 Times
I have tested it now and it works flawlessly. I changed the 'syntax' a bit to make the script easier to manage.
Create a new file called acc.cfg
Code:
// Announce Current Class
alias "acc_scout"	"msg_scout; acc_reset; alias acc_scout "
alias "acc_sniper"	"msg_sniper; acc_reset; alias acc_sniper "
alias "acc_soldier"	"msg_soldier; acc_reset; alias acc_soldier "
alias "acc_demoman"	"msg_demoman; acc_reset; alias acc_demoman "
alias "acc_medic"	"msg_medic; acc_reset; alias acc_medic "
alias "acc_pyro"	"msg_pyro; acc_reset; alias acc_pyro "
alias "acc_hwguy"	"msg_hwguy; acc_reset; alias acc_hwguy "
alias "acc_spy"		"msg_spy; acc_reset; alias acc_spy "
alias "acc_engineer"	"msg_engineer; acc_reset; alias acc_engineer "
alias "acc_reset"	"exec acc.cfg" // Enter location of acc.cfg
Another one called msg.cfg (Here you can alter the messages)
Code:
// Class Messages
alias "msg_scout"	"say_team [Scout] Meep Meep!"
alias "msg_sniper"	"say_team [Sniper] One happy camper"
alias "msg_soldier"	"say_team [Soldier] Rockets in Pockets"
alias "msg_demoman"	"say_team [Demoman] Precision spamming"
alias "msg_medic"	"say_team [Medic] Constantly Concussed"
alias "msg_pyro"	"say_team [Pyro] Hot, hot, hot!"
alias "msg_hwguy"	"say_team [HWGuy] Eats scouts for breakfast"
alias "msg_spy"		"say_team [Spy] Master of Disguise"
alias "msg_engineer"	"say_team [Engineer] SG kills are lame"
Put this in autoexec.cfg (or any other file that is loaded when you start the game up)
Code:
exec acc.cfg // Enter location of acc.cfg
exec msg.cfg // Enter location of msg.cfg
Then add this to your class cfg's (Using scout.cfg as an example):
Code:
acc_scout
For soldier.cfg put acc_soldier, etc.
bokko is offline   Reply With Quote


Old 02-11-2008, 07:29 PM   #10
Circuitous
Useless
Retired FF Staff
 
Join Date: Jun 2005
Class/Position: D Soldier, O Scout
Gametype: AvD
Posts Rated Helpful 9 Times
Send a message via AIM to Circuitous Send a message via MSN to Circuitous Send a message via Yahoo to Circuitous Send a message via Skype™ to Circuitous
I like it.
__________________
Look at all those dead links.
Circuitous is offline   Reply With Quote


Old 02-11-2008, 07:42 PM   #11
Dr.Satan
Wiki Team
Fortress Forever Staff
 
Dr.Satan's Avatar
 
Join Date: Sep 2007
Location: Greeley, CO
Class/Position: Med / Solly
Gametype: PAYLOAD
Affiliations: DET-
Posts Rated Helpful 19 Times
Me too actually...I'm going to get it on the wiki soon I swear!
__________________
(Released) conc_school | hellion_classic | ksour_PAYLOAD | mulch_faf
(Beta) alchimy_b1
(Lua) base_payload_2015
(Models) props_trainyard
Support FF:
Dr.Satan is offline   Reply With Quote


Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:15 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2020, vBulletin Solutions, Inc.