Scripting

From modwiki

(Redirected from Script events)
Jump to: navigation, search
Scripting quick reference

Image:D3square_25.png Doom 3

Image:Q4square_25.png Quake 4

Image:Preysquare_25.png Prey

Scripting is a specific domain of programming. It focuses more on specifying what should be done instead of how. Mostly read by a script parser instead of being compiled to bytecode.

On the Doom 3 engine, it is used to allow mappers or modders to change behavior without recompiling the bytecode, only a map restart is needed to parse the script again.

Contents

Different fields

The various forms of scripting in Doom 3 are:

Check out the separate topics to get more specific scripting info.

Definitions

These definitions are related to scripting.

Script parser 
The program reading a script file, here it is the Doom 3 engine.
Syntax 
The rules defining a scripting language.
Keyword 
Special word, reserved by the language to mark the start of a language construct.
Operator 
Special symbol, reserved by the language to show what operation should be done.
Variable 
A variable can be thought of as a named container used to store a value. It can only be of one data type at a time
Data type 
See data types.
Function or method 
A function is a structure to group commands so they can be reused later in the script. It is also possible to give it a return type and value.
Return value 
Once a function has finished it's commands, it can return a result.
Return type 
Defines the data type of the return value, must be given when defining a function
Object 
An instance of a class in the game code. Some of these can be referenced from the script.
Event 
Also called script event, these are the instructions you can ask an object to do.

Syntax

  • To find out about script file syntax, see the .SCRIPT format reference.
  • If you want to start immediately, go read some tutorials on level scripting.
  • If you are looking for a more steady introduction to scripting, check out the scripting basics page.

Related

See also the editing of declarations, which is not exactly a part of scripting but an important part of editing for Doom 3 engine.

  • Declarations - Declarations that define the properties and behavior of game content
Personal tools
Main