wrench.gifHEXEN - ACS - Action Code Script


An Action Code Script, (ACS) is a series of instructions to be carried out. A script is written in a C-like programming language. The script code is into pcode form and stored with the map.


The term pcode is a kind of shorthand for pseudo-code. It refers to instructions that are executed via an interpreter. Pcode is often used where a fully compiled set of instructions is undesirable, but fully interpreted speed is unacceptable. Visual Basic programs, for example, are actually compiled as a bunch of pcode instructions of a different sort.


The pcode object files made by the DeePsea HEXEN DEEPACC script compiler default to a name ending in .O when run from DeePsea.


The compiled object file contains what is called BEHAVIOR in a PWAD for HEXEN.


When you save the level with a new behavior, this new object ACS file replaces the contents of the BEHAVIOR for this entry. Refer to the ACS documentation for how to code for the script compiler.


If an ACS file is not supplied, the default BEHAVIOR resource used is the BEHAVIOR found in HEXEN.WAD for that level.


Once you save a level with a new BEHAVIOR, you do not need to that again, unless of course, you want to change your scripts.


You really can't use or swap BEHAVIOR resources between levels without examining what the scripts do. A typical error is a complaint about an invalid Polyobj num xx, when you play a level with a BEHAVIOR not made for that level.