Staredit Network

Staredit Network -> Modding Assistance -> need iscripting help
Report, edit, etc...Posted by coolpotatoes on 2006-08-26 at 12:24:02
I want to make the defiler and other zerg units use plague when they die. I know i have to add a cast spell and maybe some other stuff to the DefilerDeath, but i don't really know where to put it or the syntax to use. If someone can help i would appreciate it.
here is the defiler death code and ist special abilities
CODE

DefilerDeath:
playsnd         815 # Zerg\DEFILER\ZDeDth00.WAV
playframno      0
playfram        0x88 # frame set 8
wait            2
playfram        0x99 # frame set 9
wait            2
playfram        0xaa # frame set 10
wait            2
playfram        0xbb # frame set 11
wait            2
sprul11         139 0 0 # DefilerDeath (zerg\zdeDeath.grp)
wait            1
end            

DefilerGndAttkInit:
playsnd         110 # Bullet\zdeAtt00.wav
imgol0d         518 0 0 # Unknown518 (thingy\eplMuzz.grp)
attackwith      1
gotorepeatattk  
goto            DefilerGndAttkToIdle

DefilerSpAbility2:
playfram        0x00 # frame set 0
nobrkcodestart  
wait            1
playfram        0x11 # frame set 1
wait            1
playfram        0x22 # frame set 2
wait            1
playfram        0x11 # frame set 1
wait            1
castspell      
nobrkcodeend    
gotorepeatattk  
sigorder        2
goto            DefilerGndAttkToIdle
Report, edit, etc...Posted by Lord_Agamemnon(MM) on 2006-08-26 at 12:39:16
Add the command somewhere in the Death animation before the end (it only depends on when you want Plague to be cast.) I don't know when you want it, and I also don't know the Defiler's fram numbers, so you'll have to figure out that part on your own.

Don't use castspell, since that requires an ability linked to it. Use useweapon. Add this line somewhere in that script, and you'll be good to go:

useweapon 60

For ease of reading, you might want to line up the 60 with the column on the left; as long as they're on the same line, it shouldn't matter.
Report, edit, etc...Posted by Voyager7456(MM) on 2006-08-26 at 12:42:17
Don't forget that unless the Defiler has a target when it dies, it's not going to use the weapon properly.
Report, edit, etc...Posted by www.com.au on 2006-08-27 at 07:10:02
Would it be possibl to play the grp for the plague as an overlay and add the effect in or something?
Report, edit, etc...Posted by coolpotatoes on 2006-08-27 at 17:12:35
I just got around to testing the iscirpt and it crahes whenever one of the edited units dies. ranting.gif I just added useweapon 60 so it looks like this for all the edited units

is there more i need to add or did i just do it wrong?
CODE

DefilerDeath:
playsnd         815 # Zerg\DEFILER\ZDeDth00.WAV
playframno      0
playfram        0x88 # frame set 8
wait            2
playfram        0x99 # frame set 9
wait            2
playfram        0xaa # frame set 10
wait            2
playfram        0xbb # frame set 11
wait            2
useweapon 60
sprul11         139 0 0 # DefilerDeath (zerg\zdeDeath.grp)
wait            1
end            

Report, edit, etc...Posted by BroodKiller on 2006-08-28 at 13:35:35
I think this is because it has no target to fire the weapon at, and thus crashes. Attack animations assume that such a target exists. Try removing the 'useweapon' opcode and see if it still crashes, if so - you know what's the problem. There is some workaround for this, I am sure, I've seen it working, but don't remember details right now.
Report, edit, etc...Posted by Voyager7456(MM) on 2006-08-28 at 14:06:47
As far as I know, if there's a useweapon and no target exists, the weapon will still fire, it'll just appear in the upper left corner of the map.
Report, edit, etc...Posted by DaMiNaToR on 2006-08-28 at 14:09:59
Try this.
Next Page (1)