Sometimes when he killed his targets he would lock out commands. Not a big problem since he was CPU-controlled in Armageddon's hands, but the AI doesn't know to press "stop" to reset him, and sigorder (calling a command) in iscript doesn't actually do anything for most circumstances.
The Great Destroyer uses a mass of randomized attacks, each spawning randomized projectiles. His damage varies from 25 (armor ignoring) to several hundred to a thousand, depending which setup you end up with. His Epic "Hellsweeper" attack can actually end up 1shotting most buildings in the game. In an aoe.
So, with so many randomized attacks, one might think I goofed up somewhere. I thought that too - so I spent hours tearing the script apart.
This is what it generally looks like.
+ Show Spoiler +
DestroyerEngage:
__37 0
__35_condjmp Taunt_Attackinit
wait 15
DestroyerAttackRpt:
tmprmgraphicend
#__1e_condjmp 65 Stormcheck
#__1e_condjmp 25 EpicSequence
shvertpos -4
playsndbtwn 1115 1117
playfram 0x88
wait 1
playfram 0x99
wait 1
playfram 0xaa
wait 1
playfram 0xbb
wait 1
playfram 0xcc
wait 1
playfram 0xdd
wait 1
playfram 0xee
wait 1
playfram 0xff
wait 1
playfram 0x110
wait 1
playfram 0x121
wait 1
playfram 0x132
__35_condjmp ZahirZoharKoheem
wait 1
playfram 0x143
wait 1
playfram 0x154
wait 1
playfram 0x165
wait 1
playfram 0x176
wait 1
playfram 0x187
wait 1
gotorepeatattk
goto DestroyerGndAttkToIdle
# ===== Melee Attack Checking
MeleeCheck:
useweapon 123
__36
# === "Deathstorm", variants of the randomized max-length projectile.
Stormcheck:
playfram 0x198
wait 1
playfram 0x1a9
wait 1
playfram 0x1ba
wait 1
playfram 0x1cb
wait 1
playfram 0x1dc
wait 1
playfram 0x1ed
wait 10
__35_condjmp Taunt_WarpOut
__1e_condjmp 85 ForwardDeathstorm
__1e_condjmp 55 EpicDeathstorm
Deathstorm:
nobrkcodestart
turncwise 8
attack25 2
turncwise 8
attack25 2
turncwise 8
attack25 2
turncwise 8
attack25 2
turncwise 8
attack25 2
turnccwise 40
nobrkcodeend
goto StormReturn
ForwardDeathstorm:
nobrkcodestart
turncwise 4
attack25 2
turncwise 4
attack25 2
turncwise 4
attack25 2
turncwise 4
attack25 2
turncwise 4
attack25 2
turnccwise 20
turnccwise 4
attack25 2
turnccwise 4
attack25 2
turnccwise 4
attack25 2
turnccwise 4
attack25 2
turnccwise 4
turncwise 20
nobrkcodeend
goto StormReturn
__37 0
__35_condjmp Taunt_Attackinit
wait 15
DestroyerAttackRpt:
tmprmgraphicend
#__1e_condjmp 65 Stormcheck
#__1e_condjmp 25 EpicSequence
shvertpos -4
playsndbtwn 1115 1117
playfram 0x88
wait 1
playfram 0x99
wait 1
playfram 0xaa
wait 1
playfram 0xbb
wait 1
playfram 0xcc
wait 1
playfram 0xdd
wait 1
playfram 0xee
wait 1
playfram 0xff
wait 1
playfram 0x110
wait 1
playfram 0x121
wait 1
playfram 0x132
__35_condjmp ZahirZoharKoheem
wait 1
playfram 0x143
wait 1
playfram 0x154
wait 1
playfram 0x165
wait 1
playfram 0x176
wait 1
playfram 0x187
wait 1
gotorepeatattk
goto DestroyerGndAttkToIdle
# ===== Melee Attack Checking
MeleeCheck:
useweapon 123
__36
# === "Deathstorm", variants of the randomized max-length projectile.
Stormcheck:
playfram 0x198
wait 1
playfram 0x1a9
wait 1
playfram 0x1ba
wait 1
playfram 0x1cb
wait 1
playfram 0x1dc
wait 1
playfram 0x1ed
wait 10
__35_condjmp Taunt_WarpOut
__1e_condjmp 85 ForwardDeathstorm
__1e_condjmp 55 EpicDeathstorm
Deathstorm:
nobrkcodestart
turncwise 8
attack25 2
turncwise 8
attack25 2
turncwise 8
attack25 2
turncwise 8
attack25 2
turncwise 8
attack25 2
turnccwise 40
nobrkcodeend
goto StormReturn
ForwardDeathstorm:
nobrkcodestart
turncwise 4
attack25 2
turncwise 4
attack25 2
turncwise 4
attack25 2
turncwise 4
attack25 2
turncwise 4
attack25 2
turnccwise 20
turnccwise 4
attack25 2
turnccwise 4
attack25 2
turnccwise 4
attack25 2
turnccwise 4
attack25 2
turnccwise 4
turncwise 20
nobrkcodeend
goto StormReturn
Ect....
Now, there's a few ways you can do this. I ended up reducing it down to triggering the attacks themselves straight from the Engage thread and bypassing calls entirely, but it didn't fix anything.
Right now, I think I have it sorted out.
You know how Wraiths and other air units sometimes chase targets and their engines don't go on? Perhaps most noticeable with intense micro. This is because the game isn't actually running the "walk" movement thread, so the overlay never gets turned on.
Since the Destroyer's movement is the same as the probe and wraiths, it seems he's suspectable to the same problem. Except he depends on that thread to move, because he plays an animation and then temporarily receives his true speed (normally he can't move) - a massive speed of 50,000, effectively giving him a map-wide teleport. It's one of my little trade tricks in Armageddon Onslaught; a variant of this allowed me to give a unit a SC2 Zealot-esque charge attack.
To bypass this glaring problem with the Destroyer, I introduced a speed boost into his Idle thread, like so.
+ Show Spoiler +
DestroyerGndAttkToIdle:
__37 0
shvertpos 0
tmprmgraphicend
wait 20
__37 50000
wait 20
__37 0
Destroyeridle:
playfram 0x00 # frame set 8
wait 1
playfram 0x11 # frame set 9
wait 1
playfram 0x22 # frame set 10
wait 1
playfram 0x33 # frame set 11
wait 1
playfram 0x44 # frame set 12
wait 1
playfram 0x55 # frame set 13
wait 1
playfram 0x77 # frame set 14
wait 1
__37 0
goto Destroyeridle
__37 0
shvertpos 0
tmprmgraphicend
wait 20
__37 50000
wait 20
__37 0
Destroyeridle:
playfram 0x00 # frame set 8
wait 1
playfram 0x11 # frame set 9
wait 1
playfram 0x22 # frame set 10
wait 1
playfram 0x33 # frame set 11
wait 1
playfram 0x44 # frame set 12
wait 1
playfram 0x55 # frame set 13
wait 1
playfram 0x77 # frame set 14
wait 1
__37 0
goto Destroyeridle
__37 is setflspeed in the new IceCC opcode names, for all you newbie modders out there.
This appears to have fixed the problem. Now I can move on to actually finishing the Destroyer - he has a huge amount of special effects that need to be added. He is a God, after all!