Action Code Script
   HOME

TheInfoList



OR:

Action Code Script (ACS) is a
scripting language A scripting language or script language is a programming language that is used to manipulate, customize, and automate the facilities of an existing system. Scripting languages are usually interpreted at runtime rather than compiled. A scripting ...
used in
video game Video games, also known as computer games, are electronic games that involves interaction with a user interface or input device such as a joystick, controller, keyboard, or motion sensing device to generate visual feedback. This fee ...
s such as ''
HeXen Hexen can refer to: * ''N''-Ethylhexedrone, a stimulant drug * '' Hexen: Beyond Heretic'', a 1995 dark fantasy video game by id Software and Raven Software * ''Hexen II'', a 1997 video game and sequel to the first Hexen. * Hexen, a thrash metal b ...
'' and some modern
Doom source port The present article is a list of known platforms to which ''Doom'' has been confirmed to be ported. ''Doom'' is one of the most widely ported video games. Since the original MS-DOS version, it has been released officially for a number of operatin ...
s, such as ZDoom. It is
syntactically In linguistics, syntax () is the study of how words and morphemes combine to form larger units such as phrases and sentences. Central concerns of syntax include word order, grammatical relations, hierarchical sentence structure ( constituency) ...
similar to C, but less flexible. As its name implies, most of the core logic for script functionality comes in the form of "scripts", which are traditionally identified with a numerical value. Later revisions of the ACS compiler added support for "named" scripts (which utilize a String in lieu of the numerical identifier), and simple functions. Similar to traditional code, ACS is compiled using ACC (an homage to C's gcc utility) for use in Doom, Hexen, etc... Scripts can be executed in a variety of methods, such as being attached to in-game actors, execution through level triggers around each map, or invocation from other scripts or functions. As the entire scripting language is built as a hack on top of the ''Doom''
id Tech id Tech is a series of separate game engines designed and developed by id Software. Prior to the presentation of the id Tech 5-based game '' Rage'' in 2011, the engines lacked official designation and as such were simply referred to as the ''D ...
's engine, there is no formal support for any
object-oriented programming Object-oriented programming (OOP) is a programming paradigm based on the concept of "objects", which can contain data and code. The data is in the form of fields (often known as attributes or ''properties''), and the code is in the form of pr ...
principles.


"Hello world" example

Using the classic "hello world" example: // Similar to C's stdio.h, ACS has its own library of basic functions #include "zcommon.acs" script 1 ENTER In this basic example, the text "Hello World!" is printed upon entering the level. The syntax is as follows: * The keyword "script" to indicate its type * The print function * A string identifier, followed by the string itself


See also

*
QuakeC QuakeC is a compiled language developed in 1996 by John Carmack of id Software to program parts of the video game '' Quake''. Using QuakeC, a programmer is able to customize ''Quake'' to great extents by adding weapons, changing game logic and ph ...


External links


ACS on ZDoom's wiki

ACS on The Doom Wiki
{{videogame-software-stub Scripting languages