Introduction
Call of Duty 4 uses a language similar to C.
Call of Duty4はCに類似している言語を使います。
In Call of Duty 4, everything from AI to using animations to gameplay is done through the scripting language. The scripting language does not require a compiler, it is processed by the engine in real time. Scripts are normally contained in .GSC files, but can also be in .MENU and .H files.
Call of Duty4の中に、AIから使用アニメーションへゲームプレイへのすべてがスクリプト言語を通してされます。スクリプト言語はコンパイラを必要としません、それはリアルタイムでエンジンによって処理されます。スクリプトは.GSCファイルの中に通常落ち着いています、しかしキャンが同じく.MENUと.Hファイルにあります。
Although, with the scripting language you cannot modify source code which is proprietary code held by Infinity Ward. If it doesn't involve memory management, rendering, or netcode... you can script it.
スクリプト言語で、あなたがソースを修正することができないけれども、専有のコードであるコードがInfinity Wardを固く守りました。もしそれがメモリを伴わないなら、管理、レンダリング、あるいはnetcode・・・あなたキャンはそれを書きます。
You can use any text editing program you wish to script with. Infinity Ward uses Ultra Edit and have a custom word file to set up a Call of Duty 4 editing environment. You can find the word file located in your \bin folder.
Infinity Wardの使用Ultra Editそしてカスタムワードファイルを持ちますCall of Duty 4編集の上に環境を設定すること. あなたキャンワードファイルがあなたの\binフォルダに置かれていることを見いだしてください。
This page will serve to explain the basics of the Call of Duty 4 scripting language.
このページはCall of Duty4スクリプト言語の基礎を説明するのに役立つでしょう。
Scripts & Syntax
A script contains text which form characters. Characters form sequences which are separated into lines. Each line is terminated by a semicolon for the most part.
Scripts are sequences read by the engine and executed.
文字を形成するスクリプト部分一致テキスト。ラインに分けられる文字書式シーケンス。それぞれのラインが大部分はセミコロンによって終えられます。
スクリプトはエンジンによってのそして実行されるシーケンス読み取りです。
println( "Line One" ); // Sequence One println( "Line Two" ); // Sequence Two
Comments are characters which can be used to help explain your script to someone else or remind you what something does. They are not read by the engine. It is good practice to comment your scripts.
注釈はあなた何かがすることがほかの誰かあるいは再心にあなたのスクリプトを説明するのを手伝うために使われることができる文字です。それらはエンジンによって読み取りではありません。それは良い事がコメントにあなたのスクリプトを練習するということです。
println( "Line One" ); // This is a comment. This line will print to the screen "Line One".
Strings are containers for characters read by the engine but have no functionality.
文字列はエンジンによって文字読み取りのためのコンテナです、しかし機能を持たないでください。
println( "Line One" ); // "Line One" is a string.
Operators & Delimiters
Operators & Delimiters are special characters read by the engine to perform or mark certain functionality (they cannot be used otherwise, unless within a comment or string).
演算子&デリミタは実行するべきエンジンあるいは記号のある特定の機能(コメントあるいは文字列の中でないなら、それらは使用済みの別のことであるはずがありません)によって特殊記号読み取りです。
Delimiters include:
デリミタが含みます:
デリミタが含みます:
~ ! @ % ^ & * ( ) - + = | \ / { } [ ] : ; " ' < > ,
Operators include:
演算子インクルード:
演算子インクルード:
+ - = // / % & > < ^ ! |
White Space
Whitespace characters are spaces, newlines or tabs.
Whitespaces help to improve the readability of scripts. They are insignificant unless used in a string or to separate identifiers/script commands.
余白文字はスペース、改行あるいはtabです。
Whitespacesはスクリプトの判読性を改善するのを手伝います。文字列の中に、あるいは別個の識別子/スクリプトコマンドに使われないなら、それらはささいです。
n=(10/2)+60; // No whitespace n = ( 10 / 2 ) + 60; // Insignificant whitespace, does the same as above but easier to read println( "HelloWorld" ); // Insignificant whitespace, prints to screen "HelloWorld" println( " Hello World " ); // Significant whitespace, prints to screen " Hello World " wait0.05; // script command and characters are smashed together, will cause an error wait 0.05 // Significant whitespace, script waits 0.05 seconds
Identifiers & Script Commands
Identifiers & Script Commands are a sequence of one or more non-delimiters/non-operators. They are reserved keywords that cannot be used as variable names; trying to use an identifier/script command as a variable name will result in errors or future problems.
識別子&スクリプトコマンドは1つの列あるいはもっと多くの非-デリミター/非-オペレータです。可変がvariable nameがエラーあるいは将来の問題をもたらすであろうように;識別子/スクリプトコマンドを使おうとして名前をつけるように、それらは使われることができない遠慮がちなキーワードです。
Some identifiers & Script Commands include:
若干の識別子&スクリプトコマンドインクルード:
若干の識別子&スクリプトコマンドインクルード:
endon earthquake linkto moveto randomfloat randomint unlink useanimtree wait waittill
Literals
Numerical
Textual
Declarations & Types
Work In Progress
Names & Expressions
Work In Progress
Statements
Work In Progress
Functions
Scope
Singleplayer
Work In Progress
Entities
Utilities
Work In Progress
Multiplayer
Work In Progress
Entities
Players
Utilities
Work In Progress
Tips & Tricks
Work In Progress
Frequently Asked Questions
Work In Progress