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.
[11:23 pm]
NudeRaider -- dumbducky
dumbducky shouted: I found a sneaky way to view some of my coworkers SAT scores and it is shocking
:ban:
[11:22 pm]
NudeRaider -- dumbducky
dumbducky shouted: I miss forums. Twitter is way more engaging but unless you have a following, nobody talks to you. Reddit is just filled with the stupidest people
well, most active members here are the bots, so not sure if this is an improvement :P
[06:05 pm]
dumbducky -- I found a sneaky way to view some of my coworkers SAT scores and it is shocking
[06:03 pm]
dumbducky -- FaRTy1billion
FaRTy1billion shouted: o, i keep meaning to add things to it but instead don't
Farty does your website work anymore
[06:02 pm]
dumbducky -- I miss forums. Twitter is way more engaging but unless you have a following, nobody talks to you. Reddit is just filled with the stupidest people
[02:32 pm]
Zoan -- :wob:
[02:54 am]
Ultraviolet -- :wob:
[2024-7-25. : 2:39 am]
O)FaRTy1billion[MM] -- o, i keep meaning to add things to it but instead don't
[2024-7-24. : 11:55 pm]
Roy -- Make that three changes to the wiki in the last month, all three being just edits to user pages.
[2024-7-23. : 2:47 pm]
dumbducky -- Two changes to the wiki in the last month, both are just edits to user pages
Please log in to shout.


Members Online: Roy, Moose