Post tutorial Report content RSS feed Scripting #1: Basics

In this tutorial, we are setting up everything, which is needed for scripting.

Posted by on - Intermediate Server Side Coding

In the Call of Duty series the scripts are written in GSC files, these are controlling the gameplay. Certainly we are not allowed to modify a part of the game, which is hard-coded in the engine, but you can solve almost everything if you are creative, and you know some tricks. As default, these scripts are in the maps folder, but you can work in a different one too. You can open these files with every text editor, but I recommend using Notepad++. With this, source codes are clear, because it supports the coloring of many programming languages, and other comfortable functions. Since GSC is C based, select one of the C languages (C, C#, or C++) from the Language menu.

Language menu

To make your life easier, you can associate the GSC files with this program, so opening these files will use Notepad++ as default. In addition, you can also define the default coloring, so you won't have to select it always. For this, go to Settings->Style Configurator..., select your C language from the left, and write gsc in the User ext. field. You can define more, separated by whitespace.

Style Configurator

To understand my script tutorials, you should have some basic programming knowledge. I'll try to write as many things from the basics as I can, but I won't be able to teach you the logic of programming with just some tutorials.

The most important script behaviors:

  • The engine will process every code from the left top, to the right bottom
  • Every statement have to be closed with a semicolon
  • If a GSC exists in your mod, which is also in the default game, then yours will overwrite the existent one; which is not in your mod, that will be loaded from the default game
Post a comment
Sign in or join with:

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.

Tutorial
Browse
Tutorials
Share
Related Games
Call of Duty
Call of Duty First Person Shooter
Call of Duty 2
Call of Duty 2 First Person Shooter
Call of Duty 4: Modern Warfare
Call of Duty 4: Modern Warfare First Person Shooter
Call of Duty: World at War
Call of Duty: World at War First Person Shooter
Related Engines
id Tech 3
id Tech 3 GPL
IW Engine
IW Engine Commercial
Related Groups
Activision
Activision Developer & Publisher
Infinity Ward
Infinity Ward Developer & Publisher
Treyarch
Treyarch Developer & Publisher