Report article RSS Feed Scripting #1: Basics

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

Posted by iCore on Jan 10th, 2013
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
click to sign in

You are not logged in, your comment will be anonymous unless you join the community today (totally free - or sign in with your social account on the right) which we encourage all contributors to do.

2000 characters limit; HTML formatting and smileys are not supported - text only

Tutorial
Browse
Tutorials
Report Abuse
Report article
Related Games
Call of Duty
Call of Duty Single & Multiplayer First Person Shooter
Call of Duty 2
Call of Duty 2 Single & Multiplayer First Person Shooter
Call of Duty 4: Modern Warfare
Call of Duty 4: Modern Warfare Single & Multiplayer First Person Shooter
Call of Duty: World at War
Call of Duty: World at War Single & Multiplayer First Person Shooter
Related Engines
id Tech 3
id Tech 3 GPL Released Dec 3, 1999
IW Engine
IW Engine Commercial Released Oct 22, 2005
Related Groups
Activision
Activision Developer & Publisher
Infinity Ward
Infinity Ward Developer & Publisher
Treyarch
Treyarch Developer & Publisher