Scripts

From Fortress Forever Wiki
Revision as of 23:19, 1 May 2010 by Crazycarl (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search


Fortress Forever
NavMenu ScoutConc 300px.jpg
Scout Concing in Fortress Forever
Introduction
What is Fortress Forever?
Installation and Setup
System Requirements
DownloadsMain Menu
SetupBeginner's Guide
Scripts
Playing the Game
Team and ClassHUD
Map GuidesGame Goals
WeaponsGrenadesBuildables
AmmoArmorStatus Effects
Class Guides
ScoutSniperSoldier
DemomanMedicHWGuy
PyroSpyEngineerCivilian
Advanced Gameplay
Movement Skills
Jumping Skills
Technical Reference
Class Reference Guide
Weapons Reference Guide
Grenades Reference Guide
Ammo Reference
Armor Reference
Modding
Map Editing
FAQ
TF2 Player's Guide To FF
TFC Player's Guide To FF
Client commands and variables
Troubleshooting
Release Notes


A script is a config file (usually for a specific class) that has key binds that make it easier for you to access class-specific functions.

General Scripts

General Scripts
Cleanup Script Very useful!

List of Class-Specific Scripts

Scout Scripts
Sniper Scripts
Soldier Scripts
Demoman Scripts
Medic Scripts
HWGuy Scripts
Pyro Scripts
Spy Scripts
Engineer Scripts

Making a Script

Making a script is nothing more than stringing commands together to achieve a particular result. To create a sequence of actions, list your commands followed by a semicolon (;) then a space ( ). When listing multiple commands, make sure you use quotation marks (") to enclose your script!

Aliases

An alias is another name used to define a list of commands, just as "driving a car" is a name for all the activities that make up driving.

Example: How it should look

alias example "command1; command2; command3"

This code creates an alias named example. If we typed example into the console, or executed it in a cfg file, command 1, 2, and 3 would execute in the order listed in the alias.

An alias can also be used to shorten commands for use in scripts.

alias c4 "command4"

We can use our newly created commands, example and c4, in further scripts.

alias example2 "example; c4"

This would be a good time to visit the Script Reference to see what possibilities you can string together.

Now that you've got a list of commands in mind, or in best case, already written up, what do you do? You can copy and paste it into the console every time, or you can bind it to a key, using the bind command.

Example: Detonate dispenser

bind x "detdispenser"

Example: Medic Shout + Text

bind x "saveme; say Text here."

How to Use the class.cfg file system

Located in your FortressForever\cfg folder, you will see a .cfg file for each class. [example directory picture]

These files are executed when you spawn after dying. They are perfect for storing class-specific key bindings, as well as more advanced scripts. The Userconfig.cfg file is also loaded every time you spawn, because it is listed in the class.cfg. Userconfig.cfg is used for global scripts and aliases.

List of commands

A list of available commands can be found at the Script Reference page.

Uh oh! I screwed up one of my config files! What do I do?

Relax. Just find the default config listed below for whatever you screwed up and paste it into the config file.

Userconfig default
Scout default
Sniper default
Soldier default
Demoman default
Medic default
Hwguy default
Pyro default
Spy default
Engineer default
Civilian default