Trouble in Terrorist Town Mapping
Making maps for Trouble in Terrorist Town (Garry's Mod) is essentially the same as creating maps for other Source games with a few exceptions. TTT has its own fgd file named TTT.fgd which includes gamemode specific entities. Vauge descriptions of these entities, the fgd, as well as a few map examples are available at
http://ttt.badking.net/mapping-guide
However, due to the map help forums being down, it is mostly up to YouTube videos, and scattered tutorials throughout different forums that developers use to get help for specific things.
This page will give detailed descriptions of each entity included in the FGD, instructions on how to modify the FGD for various reasons, how to setup hammer and test your map, and tutorials on various gamemode specific entities and logic.
Entities
ttt_credit_adjust
This entity is used within map logic in order to give or take credits away from a player. Keep in mind only Detectives and Traitors carry credits. When activated, it tries to remove (or give) the specified number of credits from the !activator. If the entity successfully adjusts the amount of credits, it will fire its output OnSuccess. If it fails to adjust credits, it will fire its output OnFail. If giving credits away, the entity will never fire OnFail.
Properties
Targetname - The name that other entities refer to this entity by.
Origin - Position of entity's center in the map.
Credits - The amount of credits to take. This can be set to a negative value to give the !activator credits.
A practical example of this entity is to have a Traitor room door that will only open if the activator spends 1 credit. This would be done by having a ttt_traitor_button with logic as follows.
My Output Named: OnPressed, Targets entities named: ttt_credit_adjust, Via this input: TakeCredits, Parameters: none.
Then on the ttt_credit_adjust, with the credit amount set to 1, have outputs as follows.
My Output Named: OnSuccess, Targets entites named: traitorroom_door, Via this input: Open, Parameters: none.
When the player presses the button, they become the !activator of the chain. When the button tells the credit adjust to take credits it attempts to take a credit from the !activator. If it succeeds in taking this credit, it fires the output, telling the door to open.