DO/CTL

From Dark Omen Wiki

(Difference between revisions)
Jump to: navigation, search
(Remove all text from CTL (move to discussion))
(Beginning)
Line 10: Line 10:
</div>
</div>
</div>
</div>
 +
 +
CTL is the script executed on the battlefield. It's used to control the AI and it implements the logic of all units (also of allied ones). Use [http://en.dark-omen.org/downloads/view-details/1.-modding-tools/4.-miscellaneous-tools/ctldis.html CTLdis] to modify CTL files.
 +
 +
== Structure ==
 +
 +
A CTL file consists of many functions. On startup every regiment executes one of these functions. Functions starting from 100 are common functions used in all CTL files. Allied units always execute .func 100.
 +
 +
Example of a script function:
 +
.func 2
 +
    init_unit 128
 +
    clear_ctrl_flag 32768
 +
    set_label 43970
 +
    #3c 240, 0
 +
    set_event_handler 15
 +
    #3e 13, 31
 +
    wait_for_deploy
 +
    saveip
 +
    goto 7
 +
 +
The script is connected via ARM and BTB file (Chunk <6000>):
 +
 +
[[File:Armbtbctl.png‎]]

Revision as of 10:38, 8 April 2012

Contents


CTL is the script executed on the battlefield. It's used to control the AI and it implements the logic of all units (also of allied ones). Use CTLdis to modify CTL files.

Structure

A CTL file consists of many functions. On startup every regiment executes one of these functions. Functions starting from 100 are common functions used in all CTL files. Allied units always execute .func 100.

Example of a script function:

.func 2
    init_unit 128
    clear_ctrl_flag 32768
    set_label 43970
    #3c 240, 0
    set_event_handler 15
    #3e 13, 31
    wait_for_deploy 
    saveip 
    goto 7

The script is connected via ARM and BTB file (Chunk <6000>):

File:Armbtbctl.png‎

Personal tools
communication