Zh-tw/Developer console: Difference between revisions
(→總覽) |
|||
Line 56: | Line 56: | ||
控制台將最後被執行的指令給儲存起來,藉由上鍵<UpArrow>與下鍵<DownArrow>將其出現到輸入欄裡。您能壓住對位鍵<Tab>來選擇一串清單可能的指令來完成一個指令(如果控制台找到多數符合對象)。某些指令也(如:<code>map</code>,<code>load</code>等等)提供自動完成第一個參數。 | 控制台將最後被執行的指令給儲存起來,藉由上鍵<UpArrow>與下鍵<DownArrow>將其出現到輸入欄裡。您能壓住對位鍵<Tab>來選擇一串清單可能的指令來完成一個指令(如果控制台找到多數符合對象)。某些指令也(如:<code>map</code>,<code>load</code>等等)提供自動完成第一個參數。 | ||
== | ==指令與變數== | ||
控制台中可輸入的內容分為控制指令與控制變數兩種。 | |||
'' | ''控制指令''通常藉由輸入參數給某些程式函式並執行之,但不把參數的內容保留下來。 | ||
''Console variables'' store the last parameters like a global setting. Console variables can only have one parameter, which can be a number or string; it depends on the game code how these values are interpreted. A lot of console variables act like triggers, 0 usually means off and 1 means on (e.g. <code>cl_showfps</code>). To see the current value of a console variable just type the name without any parameters. | ''Console variables'' store the last parameters like a global setting. Console variables can only have one parameter, which can be a number or string; it depends on the game code how these values are interpreted. A lot of console variables act like triggers, 0 usually means off and 1 means on (e.g. <code>cl_showfps</code>). To see the current value of a console variable just type the name without any parameters. | ||
Line 137: | Line 137: | ||
The command <code>help <command></code> shows help text for a given command (if available). | The command <code>help <command></code> shows help text for a given command (if available). | ||
==See Also== | ==See Also== |
Revision as of 06:22, 31 December 2006
總覽
在進行關卡或模組時,開發模式控制台允許您輸入控制指令給Source引擎來進行測試。
在控制台輸入help
會告訴您一些指示。
藉由輸入find <部分字串>
用來尋找跟控制指令或控制變數相關的指令(例如:輸入find npc
將會顯示出NPC除錯指令的清單,像是npc_go和npc_create)。
介紹
開發模式控制台是開發者一個基本的工具,用來對程式碼進行除錯或讓使用者能自訂他們的想要的功能(無敵、飛行等等)。控制台是輸出入的文字模式,在遊戲運作期間接受執行命令或是改變全域變數的設定。
開啟命令列控制台
以下是開啟命令列控制台的步驟:
- 開啟遊戲或模組。
- 點選主選單中的選項。
- 點選鍵盤標籤。
- 點選進階...按鈕。
- 將啟用設計者命令列(~)打勾。
- 確認。
接者,命令列控制台可以藉由按鍵盤上的~(蚯蚓符號,在ESC鍵的下方)來開啟或關閉。
命令列控制台也可以藉由加入參數-dev
與-console
執行遊戲來開啟。(開發者應該永遠使用-dev
來開啟遊戲)
如果Source引擎是藉由參數的方式來開啟命令列控制台,在進入主選單時控制台就會自動出現。
使用-condebug
開啟遊戲會將所有的控制台內容紀錄在您遊戲資料夾中的console.log
裡。
輸入指令
指令被輸入在控制台下的輸入欄裡。當輸入完新指令後,按下<Return>或點選Submit按鈕進行執行。
一個指令有他獨特的識別名稱與一串可選擇的參數,每個參數中間使用<Space>鍵分開。
語法: 命令 <參數一> [<參數一>]
。舉個例子:
]bind mouse1 +attack ]map dm_lockdown
如果參數本身包含空格<Space>,則參數必須使用雙引號包起來:
]bind h "say hello world" ]name "Gordon Freeman"
控制台將最後被執行的指令給儲存起來,藉由上鍵<UpArrow>與下鍵<DownArrow>將其出現到輸入欄裡。您能壓住對位鍵<Tab>來選擇一串清單可能的指令來完成一個指令(如果控制台找到多數符合對象)。某些指令也(如:map
,load
等等)提供自動完成第一個參數。
指令與變數
控制台中可輸入的內容分為控制指令與控制變數兩種。
控制指令通常藉由輸入參數給某些程式函式並執行之,但不把參數的內容保留下來。
Console variables store the last parameters like a global setting. Console variables can only have one parameter, which can be a number or string; it depends on the game code how these values are interpreted. A lot of console variables act like triggers, 0 usually means off and 1 means on (e.g. cl_showfps
). To see the current value of a console variable just type the name without any parameters.
Most console commands and variables have prefixes in their name to show the subsystem they belong to, but this isn't always the case, especially for commands coming from Half-Life 1, where the old name was kept unchanged.
Commonly used console command prefixes are:
ai_ |
single player AI |
cc_ |
close caption system |
cl_ |
multiplayer client |
demo_ |
demo playback |
disp_ |
terrain displacement maps |
dsp_ |
audio DSP settings |
ent_ |
entity control/debug |
fire_ |
firing entity events |
fog_ |
fog renderer |
g_ |
single player game |
hltv_ |
Half-Life TV |
host_ |
host system |
hud_ |
client HUD |
joy_ |
joystick input |
log_ |
logging system |
m_ |
mouse input |
mat_ |
material system |
mp_ |
multiplayer game (server) |
nav_ |
navigation graphs |
net_ |
engine networking |
npc_ |
single player game NPCs |
phys_ |
physics system |
r_ |
video renderer |
rcon_ |
remote control access |
sk_ |
player skill / difficulty |
snd_ |
sound system |
sv_ |
server settings (engine) |
v_ |
client view |
vgui_ |
VGUI |
voice_ |
ingame player voice |
vprof_ |
code profiler |
wc_ |
WorldCraft/Hammer helpers |
If you forgot the exact name of a command or variable, find <substring>
shows all commands containing a given substring.
The command help <command>
shows help text for a given command (if available).
See Also
- Console Command List - A complete list of console commands and variables.
- Category:Console Commands - A list of articles on console commands.
- Category:Console Variables - A list of articles on console variables.
Template:Otherlang:en Template:Otherlang:en:ru, Template:Otherlang:en:jp, Template:Otherlang:en:pl, Template:Otherlang:en:es