Staredit Network > Forums > Modding Assistance > Topic: Unit moving during an attack?
Unit moving during an attack?
Apr 28 2009, 6:35 am
By: FlashBeer  

Apr 28 2009, 6:35 am FlashBeer Post #1



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.

Apr 28 2009, 8:18 am IskatuMesk Post #2

Lord of the Locker Room

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.

Apr 28 2009, 7:43 pm HailFire Post #3



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.

Apr 28 2009, 9:06 pm Sand Wraith Post #4



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.




Apr 28 2009, 9:41 pm ForTheSwarm Post #5



Quote from FlashBeer
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.

Code
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.

Apr 29 2009, 6:46 pm Biophysicist Post #6



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.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[2026-9-14. : 3:21 pm]
Oh_Man -- Racoon City Remastered*
[2026-9-14. : 3:21 pm]
Oh_Man -- Join the front line SEN, DEFEND MANKIND. 2030 is just a number! https://scmscx.com/map/2fHHj96p
[2026-9-14. : 3:21 pm]
Oh_Man -- from the maker of the legendary Architect RPG, the peerless Racoon City, the capitvating One Piercing Note, comes another creation minutes in the making
[2026-9-14. : 11:15 am]
Oh_Man -- heh heh thanks for the minerals suckers, now it's time to quit while i'm ahead
[2026-9-14. : 1:01 am]
Oh_Man -- Heroes of the Storm literally died and was revived before we got next SC game. Wb Loveless, u cooking any UMS for us?
[2026-9-13. : 11:35 pm]
LoveLess -- getting diablo 5 and wow 4 before starcraft ghost
[2026-9-13. : 9:22 pm]
RIVE -- To be fair, I used to post custom emotes back when I still used the forums.
[2026-9-13. : 12:54 pm]
l)ark_ssj9kevin -- RIVE
RIVE shouted: 💯
holy shit did you just use an emoji on SEN that feels illegal 🍆
[2026-9-13. : 10:24 am]
Moose -- Heinermann
Heinermann shouted: new era of SC and it's just some shooter they're gonna cancel before 2030
StarCraft 2: Ghost 2, The Reghostening
[2026-9-13. : 3:38 am]
Symmetry -- :wob:
Please log in to shout.


Members Online: Heinermann, Zoan