• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Casting and Attacking While Moving

Status
Not open for further replies.
Level 11
Joined
Aug 24, 2012
Messages
429
Like the title says, is there a way to achieve this? And I mean proper attacking, not Phoenix Fire auto-attack spell. I only want this for a few light, raiding units.

Also the casting bit. I know you can trigger spells, but in order to do this you would need a dummy spell, and for that to be castable the unit would have to stop, or am I getting things wrong? Are there any abilities that can be casted without the caster stopping to serve as a base for a triggered spell?
 
Level 5
Joined
Mar 6, 2015
Messages
130
I`v seen this phenomenon from my experience with my KnockBack system when you use SetUnitX and SetUnitY the unit moves but he is be able to attack cast spells and even channeling a spell i think you can setup a system that converts move order to Point and then calculate the current speed of unit and move the unit to that point this is just a theory , i`v never tried this before
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
Depends on what you really need.

If you just need to cast a spell without interrupting the movement of a unit, then you can use that.

But if you want to channel a spell or attack while still being able to move, that is something different.
 
Level 12
Joined
Nov 3, 2013
Messages
989
I recall someone making a map where you play as a D3 Demon Hunter (or something similar) in that mini-map contest like a year ago or something.

You'd basically walk through rooms like in "The Bindings of Isaac". Anyway in this map you walked and attacked simultaneously and the character could walk in one direction while attacking in another.

That said the maker probably used some gimmicky trick like having two different units or something. But it could still be something to look into. (Assuming that somebody actually know which map this is lol...)
 
Level 11
Joined
Aug 24, 2012
Messages
429
I recall someone making a map where you play as a D3 Demon Hunter (or something similar) in that mini-map contest like a year ago or something.

You'd basically walk through rooms like in "The Bindings of Isaac". Anyway in this map you walked and attacked simultaneously and the character could walk in one direction while attacking in another.

That said the maker probably used some gimmicky trick like having two different units or something. But it could still be something to look into. (Assuming that somebody actually know which map this is lol...)

This post resembles my idea the most.

I basically want a few archer cavalry units that can attack while moving. What I would go for is a invisible dummy unit that always follows the archer and attacks whatever I right-click with the archer selected. That dummy unit would continue to attack the same target until the archer is outside of range or I right-click another unit OR the target is within range but outside of a certain arc that begins at the front of the archer unit (this last point is not vital).

I would probably have to edit the models themselves in order to make their torsos as turrets (which I haven't the slightest idea how to do, though I am willing to learn). Does anyone know if a turret resets its position if a unit moves (eg walking Cannon Towers)? I would also need to make this turret constantly face the target of the dummy unit while also playing an Attack and Move animation at the same time.

Is this feasible? Maybe its just not worth it for a few cavalry units...

Anyway, could anyone point me to some tutorials that could provide answers to my questions?
 
It's not too difficult to obtain this, however it's hard to visibly show it. This is because you need new animations due to almost no models having walk+attack animation sets. If you want it to attack and move, it'll slide while attacking without those unless you put two units together for example villagers on horses however it might get lag if you have too many units using this system.
 
Last edited:
Level 7
Joined
Oct 19, 2015
Messages
286
Since you're going to trigger it you could use the feature to lock body-part facing (mainly used in cinematics) in order to have your archers face the target (the only bones that can be locked by this feature are head and chest), then you wouldn't have to use a turret. You'd need additional checks for whether the unit is moving to know which attack animation to play, attack or attack-walk.
 
Level 11
Joined
Aug 24, 2012
Messages
429
It's not too difficult to obtain this, however it's hard to visibly show it. This is because you need new animations due to almost no models having walk+attack animation sets. If you want it to attack and move, it'll slide while attacking without those unless you put two units together for example villagers on horses however it might get lag if you have too many units using this system.

I don't want the unit to appear sliding, that's why I was asking about model editing.
 
Status
Not open for further replies.
Top