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

she/her

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.
[06:18 am]
Sylph-Of-Space -- No complaints here, i'm just curious!
[11:05 pm]
Ultraviolet -- :wob:
[03:55 pm]
Zoan -- :wob:
[10:34 am]
NudeRaider -- SEN doesn't rely on spammers initiate its sleep cycle. It hat fully automated rest and clean-up phases. Please understand that this is necessary for the smooth operation of the site. Thank you.
[2024-5-18. : 3:45 am]
Sylph-Of-Space -- Does the shoutbox get disabled when there's spammers?
[2024-5-17. : 6:47 am]
NudeRaider -- lil-Inferno
lil-Inferno shouted: nah
strong
[2024-5-17. : 5:41 am]
Ultraviolet -- 🤔 so inf is in you?
[2024-5-17. : 4:57 am]
O)FaRTy1billion[MM] -- my name is mud
[2024-5-17. : 4:35 am]
Ultraviolet -- mud, meet my friend, the stick
[2024-5-16. : 10:07 pm]
lil-Inferno -- nah
Please log in to shout.


Members Online: Roy