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.
[04:00 pm]
Vrael -- good map
[04:00 pm]
Vrael -- damn dude you got 27 years of playtime out of that map
[03:01 pm]
Oh_Man -- https://www.youtube.com/watch?v=JgODe0xG2Cw finished it last week lol
[01:37 pm]
Vrael -- jesus christ that was 2005?
[09:19 am]
Linekat -- cool
[01:56 am]
Oh_Man -- cool bit of history, spellsword creator talking about the history of EUD ^
[09:24 pm]
Moose -- denis
[2024-4-19. : 5:00 pm]
lil-Inferno -- benis
[2024-4-19. : 10:41 am]
v9bettel -- Nice
Please log in to shout.


Members Online: NudeRaider, Roy, DarkenedFantasies