Difference between revisions of "Scripting FAQ"

From Team Fortress Wiki
Jump to: navigation, search
m (CTF Getting -or not- Intelligence as Spy)
 
(Redirects to Scripting#Scripting FAQ)
 
(9 intermediate revisions by 6 users not shown)
Line 1: Line 1:
==Global Script Questions==
+
#REDIRECT [[Scripting#Scripting FAQ]]
 
 
===Print Console to TXT file from Console Command===
 
:Posted by [[User:Josiah|Josiah]]
 
*'''Q.''' Is there a way to Print the contents of the console to a txt file through a console command? I set up a simple script for my server to print out the status and go right to the ban menu of sourcemod. We have some bookkeeping practices for my server where we like to keep steam ids of banned people. There fore I want to get that status list in to a simple text file so it can be accessed later.
 
 
 
*'''A.''' There is a command called "condump" that saves all of the text currently in the console window to a condump###.txt file in team fortress 2/tf. It saves ''the entire console'', but your status list would just be at the bottom. --[[User:IAmThermite|IAmThermite]] 21:25, 13 September 2009 (UTC)
 
 
 
===HUD On/Off===
 
:Posted by [[User:Bolange|Bolange]]
 
*'''Q.''' Is there anyway to turn the HUD on or off for use in a script?
 
*'''A.''' '''''cl_hud_minmode''''' set to "1" will give you a minimalist HUD view, you can also set this by going to your Options->Multiplayer. If you want to completely remove all HUD items though, you can use the commands '''''cl_drawhud 0''''' to remove the HUD and '''''r_drawviewmodel 0''''' to remove the gun (useful for screenshots), ''but'' Valve seem to have now classed these commands as cheats so they can '''only''' be used when '''''sv_cheats''''' is set to "1" --[[User:Aurora|Aurora]] 01:00, 22 November 2007 (BST)
 
 
 
===Reloading .cfg without closing the game?===
 
:Posted by [[User:Jabu2oz|Jabu2oz]]
 
*'''Q.''' Is there a way of "refeshing" a .cfg file (e.g. autoexec.cfg) without closing/reopening TF2? This would be useful when trying out scripts. (NB, I have tried "exec autoexec" from the console (and restarting the server) but this didn't seem to work).
 
 
 
Edit: Thanks, "exec autoexec.cfg" worked, but I did have to start a server without commentary mode on (single player). --[[User:Jabu2oz|Jabu2oz]] 15:10, 19 December 2007 (CST)
 
*'''A.''' Did you try "exec autoexec.cfg" from the console? You need to give it the full file name if memory serves. If you're working with a server, some settings require a map change to take effect (sv_pure comes to mind here). -- [[User:WanderingFox|<span style="color:#8F0000;">WanderingFox</span>]]&nbsp;<span style="vertical-align:super;font-size: smaller;">([[User talk:WanderingFox|<span style="color:#8F0000;">Talk</span>]]&nbsp;•&nbsp;[[Special:Contributions/WanderingFox|<span style="color:#8F0000;">Contribs</span>]])</span> 15:15, 18 December 2007 (CST)
 
 
 
===Removing Scripts===
 
How do we remove scripts?--[[User:B-MAN|B-MAN]] 09:57, 1 May 2010 (UTC)
 
 
 
==Class Specific Script Questions==
 
===Multiple Key Binds===
 
:Posted by [[User:Bolange|Bolange]]
 
 
 
*'''Q.''' Is it possible to make a variable to use the same key with multiple bindings depending on the class you are? e.g. In Spy, press F1 to disguise in Scout, in Engineer, press F1 to build a sentry etc...
 
 
 
*'''A.''' Yes, however you will need to create separate scripts for each class, i.e. spy.cfg and engi.cfg and put the binds in these, see the [[General_class_scripts#Class_Config_Switcher|Class Config Community Scripts]] for more information. --[[User:Aurora|Aurora]] 14:10, 21 November 2007 (BST)
 
 
 
===CTF Getting -or not- Intelligence as Spy===
 
:Posted by [[User:Xerox|Xerox]]
 
 
 
*'''Q.''' Is there a way to bind a command for not to take enemies intelligence when you're in Spy, unless you press a key? You might need it if a sentry is very near the case and you want to sap it first.
 
 
 
*'''A.''' None that I know of, you can throw the [[Intelligence]] but by this time it will be too late and you will have lost your [[disguise]]. It's actually a common tactic of some [[Engineer]]'s (especially on [[2fort]]) to position a [[Sentry]] or [[Dispenser]] behind the [[Intelligence]] in the hope that the [[Spy]] will pick up the [[Intelligence]] by mistake when trying to [[Sapper|sap]] the [[Building]]. Another way [[Engineer]]'s use this to their advantage is if the [[Intelligence]] is in a corridor; by placing the [[Sentry]] behind the [[Intelligence]] it forces the [[Spy]] to go an alternative way round to be able to [[Sapper|sap]] the [[Sentry]] or hop over the [[Intelligence]] and therefore clearly identify himself. --[[User:Aurora|Aurora]] 01:20, 22 November 2007 (BST)
 
 
 
[[Category:Scripts]]
 
 
 
[[Category:Every page]]
 

Latest revision as of 14:23, 15 October 2010