Wikipedia

Action Code Script

Also found in: Acronyms.

Action Code Script (ACS) is a scripting language used in video games such as HeXen and some modern Doom source ports, such as ZDoom. It is syntactically 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's engine, there is no formal support for any object-oriented programming 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 {  print(s:"Hello World!"); } 

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

External links


This article is copied from an article on Wikipedia® - the free encyclopedia created and edited by its online user community. The text was not checked or edited by anyone on our staff. Although the vast majority of Wikipedia® encyclopedia articles provide accurate and timely information, please do not assume the accuracy of any particular article. This article is distributed under the terms of GNU Free Documentation License.

Copyright © 2003-2025 Farlex, Inc Disclaimer
All content on this website, including dictionary, thesaurus, literature, geography, and other reference data is for informational purposes only. This information should not be considered complete, up to date, and is not intended to be used in place of a visit, consultation, or advice of a legal, medical, or any other professional.