QUOTE(Pyro-Fire @ Jun 12 2006, 06:45 AM)
use icecc.
[right][snapback]505038[/snapback][/right]
I agree 100% with Pyro on this one. I'd definitely say it's best if you go right ahead and learn to use IceCC immediately. ICE is nice for minor changes to existing animation structures, but when you want to make some important changes, it's hard to keep track of labels and goto instructions. Actually, this is more my opinion than anything, so it's up to you, really.
At any rate, I looked into Zerg Doom some more, and here's a complete solution to what it is you want to do, using IceCC and DatEdit:
First, here is the code to be changed in iscript.bin (as decompiled by IceCC):
In the Broodling's header, find GndAttkInit and make the following changes:
(the code to be added/changed is marked in red)
BroodlingGndAttkInit:
playfram 0x77
wait 1
nobrkcodestart
playfram 0x88
wait 1
playfram 0x99
playsnd 786
tmprmgraphicstart
imgol 508 0 0
useweapon 57
wait 10
useweapon 87
wait 1
goto someUniqueLabelName
someUniqueLabelName:
wait 125
goto someUniqueLabelNameNow, lets look at some of that:
Everything before the red text is just the broodling's regular attack animation, before it uses it's weapon, ie plays some animation frames and then plays it's attack sound.
In the red code, the first instruction (
tmprmgraphicstart) actually removes the graphic (makes it invisible), though the broodling is not actually dead yet.
The second instruction,
imgol places some kind of explosion over the broodling. According to DatEdit it's an unused explosion, so I don't remember what it looks like, really. At any rate this instruction isn't all that important.
The two
useweapon instructions are where it all happens. The first one is the spawn broodlings weapon (ID 57), it hasn't been changed at all. The second weapon used (ID 87) is an unused weapon in weapons.dat, and that one will have to be changed using DatEdit -- I'll get to that. This weapon is the one that will kill the broodling. The
wait instruction between the two attacks may be important. It might be that the first weapon has to have finished taking effect before the broodling suicides to work properly. Or it just might be that BSTRhino put that delay in there because that's how he thought the timing looked better. You can try reducing the delay to
wait 1 and see what happens.
The
goto someUniqueLabelName instruction basically just tells the script reader to go to a label that just loops constantly back to itself. Essentially this is just to stop the script reader from reading any more instructions and doing anything else. I know it may look a bit strange, but that's the way iscript.bin works.
Now, the changes to be done in DatEdit!Open up DatEdit and make the following changes to your arr\weapons.dat file:
Important: The spawn broodlings weapon (ID 57) does
not need to be changed. It's probably best not to touch it to avoid strange things happening to the queen when she casts it.
The changes to be done will be to the weapon at ID 87; I think it's called Missiles (unused) in DatEdit. Basically this 'weapon' will do nothing but kill the unit that uses it. Change it's damage to zero and make sure it doesn't have anything in the 'Use Tech' part (that is, it is set to 'None'). BSTRhino also has the cooldown set to 1, though again I don't know if this is important. What is important is to change the behaviour to 'Suicide' and its graphic to 'White Circle (Invisible)'.
Now,
in theory everything should be working. I haven't tested this myself, but this is essentially the code taken straight from BSTRhino's Zerg Doom, and it works in there.
That was kind of long and probably uneccessarily detailed, but hey, whatever. Have fun with that.