I wanted to make a dark templar automatically perform a quick dash toward enemies when within target acquisition(or something similar) range, so that it may quickly close the distance to attack enemies, but it doesn't effect normal walking pace.
Is it even possible to have units move while attacking? Might be cool to see tanks that recoil when firing.
None.
Move while attacking; I heard somewhere that turrets can do it but never tried it.
Dash - doable, and done in AO in several types.
Show them your butt, and when you do, slap it so it creates a sound akin to a chorus of screaming spider monkeys flogging a chime with cacti. Only then can you find your destiny at the tip of the shaft.
Mesk has dashes down perfect, ask him.
Ask for running and gunning; I've made a goliath that could walk and shot, but I don't remember how; try removing the nobrkcodes from the unit base's (NOT the turret's) attack iscripts.
None.
Running and shooting is stuttered at best and involves setting the Attack Unit and/or the Attack Move orders in the units.dat file to Attack In Range.
I wanted to make a dark templar automatically perform a quick dash toward enemies when within target acquisition(or something similar) range, so that it may quickly close the distance to attack enemies, but it doesn't effect normal walking pace.
Some code I made in order to replicate the SC2 Zealot's Charge. Modify it for the Dark Templar as you see fit.
ZealotWalking:
trgtrangecondjmp 200 Charge #triggers the charge at a certain distance (200 pixels?)
move 4
wait 1
playfram 0x55 # frame set 5
move 4
wait 1
playfram 0x66 # frame set 6
move 4
wait 1
playfram 0x77 # frame set 7
move 4
wait 1
playfram 0x88 # frame set 8
move 4
wait 1
playfram 0x99 # frame set 9
move 4
wait 1
playfram 0xaa # frame set 10
move 4
wait 1
playfram 0xbb # frame set 11
move 4
wait 1
playfram 0xcc # frame set 12
goto ZealotWalking
Charge:
imgol 377 0 0 #just a graphical effect, not necessary
move 12
wait 1
playfram 0x55 # frame set 5
move 12
wait 1
playfram 0x66 # frame set 6
move 12
wait 1
playfram 0x77 # frame set 7
move 12
wait 1
playfram 0x88 # frame set 8
move 12
wait 1
playfram 0x99 # frame set 9
move 12
wait 1
playfram 0xaa # frame set 10
move 12
wait 1
playfram 0xbb # frame set 11
move 12
wait 1
playfram 0xcc # frame set 12
goto ZealotWalking
None.
Wouldn't it make more sense to put the trgtrangecondjmp in GndAttkInit? Because atm, you could tripple the zealot's speed by ordering it to move less that 200 pixels, then reissuing the order slightly closer to where you want the zealot to move to, and so on.
None.