Talk:DO/CTL/OpCodes

From Dark Omen Wiki

(Difference between revisions)
Jump to: navigation, search

Revision as of 02:02, 23 February 2010

Will be added later to the table:

#b5 0, nodeid, 8192

True if one of the players regiments is in the circle defined by nodeid.
What the 0 and 8192 (a flag?) checks is unknown. Only tested in B1_07 (Attack Helmgart). Every #b5 uses 0 and 8192 there...


#53 nodeid

(necromancer in helmgart has #54 nodeid, not tested if this is the same)

Teleports a regiment. This is used as a part of unit activation (=teleport on the map)
Attention: #53 must be followed by either #55 or #71 or the unit will glitch to the node!
#71 does a simple teleport and #55 does a zombie-raise-animation (only works for zombie sprite)

Basic Unit activation (Trading Post Goblins), not always used:

set_unit_flag 2048 ; Activates the Banner graphic (not needed but really useful ;))
#53 24             ; Teleport node (see above)
#71                ; Normal Teleport
#50                ; Rest Unknown
#3c 240, 0
#2c 8

Typical way to block a regiment until the player reaches a special point:

set_r_i 6, 1 ; Set register 6 to 1
do 
    set_wait_time 6
    wait 
    #b5 0, 15, 8192 ; Check if player hit node 15
    iftrue 
        set_r_i 6, 0
    endif 
    #d6 0           ; Unknown, but works with only #b5 of course too...
    iffalse 
        set_r_i 6, 0
    endif 
    test_r_eq_i 6, 0 ; If one of the two above events happened the unit will be spawned
 whilenot
 set_unit_flag 2048 (rest see above)
 

The above code is often shared for lots of regiments to allow simultanious spawning of them (at different node id of course ;))

Hm stupid wiki converts # to a enumeration... (1., 2., 3.)

--Ghabry 02:02, 23 February 2010 (UTC)

Personal tools
communication