• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

HIVE

Uncle
Uncle
If you're using Move Unit Instantly then it's because it issues a Stop order. Also, when using the move method that doesn't Stop -> SetUnitX/Y(), the unit can be "displaced" and be considered still in it's original position despite appearing to have moved elsewhere - a Stop order will fix this.
deepstrasz
deepstrasz
Thanks! So there's no way it can attack if I use the Move Unit Instantly then?
SetUnitX/Y is a custom script trigger right? So, that one enables the unit to attack while moved?
Uncle
Uncle
Correct. Although, technically it could attack in between the 0.10 second intervals if you made it attack fast enough.
deepstrasz
deepstrasz
Attack cooldown, backswing and damage point are set to 0; the unit attacks super fast. I'll try even faster :\? Although that would be killer for the gameplay.
Uncle
Uncle
It still has to turn and face the target as well, I would just rely on the custom script.
deepstrasz
deepstrasz
Gonna check it out when I get some time for it. Hope I can figure it out, since you always need to set both X and Y? Or can you use a specified point instead?
Uncle
Uncle
You can set a Point and then get the X and Y values of that point inside of the SetUnitX/Y functions:
  • Set Variable U = (Casting unit)
  • Set Variable P = (Target point of ability being csat)
  • Custom script: call SetUnitX( udg_U, GetLocationX(udg_P) )
  • Custom script: call SetUnitY( udg_U, GetLocationY(udg_P) )
deepstrasz
deepstrasz
Hey. Sorry to bug you again. Apparently, the unit is still not attacking while being moved with the triggers above:
  • Fjords Sapphiron Sky Rage Attack
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • -------- Move Position --------
      • Set SapphironRageSpawnPoint = (Position of HeroSapphiron)
      • Custom script: call SetUnitX( udg_SapphironRageAttacker, GetLocationX(udg_SapphironRageSpawnPoint))
      • Custom script: call SetUnitY( udg_SapphironRageAttacker, GetLocationY(udg_SapphironRageSpawnPoint))
      • Custom script: call RemoveLocation (udg_SapphironRageSpawnPoint)
      • -------- Attack Position --------
      • Set SapphironRageAttackPoint = ((Position of HeroSapphiron) offset by 400.00 towards (Facing of HeroSapphiron) degrees)
      • Unit - Order SapphironRageAttacker to Attack Ground SapphironRageAttackPoint
      • Custom script: call RemoveLocation (udg_SapphironRageAttackPoint)
Uncle
Uncle
Bug me whenever. As far as I can tell the issue may be that the interval is too short, the variable HeroSapphiron isn't set, and/or the variable SapphironRageAttacker isn't set.
deepstrasz
deepstrasz
Is there a way to make the unit attack faster then? Would making a custom spell like a carrion swarm or crushing wave cast faster that the 0.1s which always order the unit to act? I've set 0 to animations and cooldown for the unit attack. Even tried - values to 100 and still the same.
The variables are set as far as I can tell. Sapphiron moves while the dummy unit is moved with those custom scripts but the attack doesn't happen. If I set the timer to less, the unit attacks but that means the unit will stay behind Sapphiron's movement and the projectile start point will remain behind.
Uncle
Uncle
It sounds like the unit has to turn to face the attack point, which is what's causing the delay
deepstrasz
deepstrasz
That's strange because it's facing where Sapphiron is facing. I'm gonna test it with a 0 or the lowest turning speed. Thanks for the suggestion.
Uncle
Uncle
Well, on recent patches I'm pretty sure a unit with 0.01 attack cooldown will attack 100 times per second - as expected. The only thing that would interfere there is interrupting orders, animation times, and/or having to turn to face it's target. But I could be wrong.

Try to narrow the problem down by ensuring that it can even attack this fast in the first place and then go from there, testing each new interaction as you go. Try things one after the other to know for certain what does and doesn't work.
deepstrasz
deepstrasz
Yeah, it can attack fast although it takes a while to begin or something. I'm also testing on 1.31.1 because there are issues on +1.32 with some textures or game file models making the editor crash when accessing doodads or destructibles.
deepstrasz
deepstrasz
Alright, I've managed to make the dummy attack Sapphiron while moving. Let's see if I am successful with the ground attack.
Uncle
Uncle
So unit's have a cast point and cast backswing for their abilities which manages the animation and time component of spell casting. They also have a damage point and damage backswing which does a similar thing but for their attacks. Perhaps the "takes a while to begin" is the damage point interfering. Otherwise, I'd say it's a delay caused by the unit having to turn to face it's target. Or both.
deepstrasz
deepstrasz
Well, it works if I put the unit to attack Sapphiron but attack ground doesn't work. I guess it might be hardcoded as a sort of ability/command which has its own start time, I guess? I set -50 to animation backswing point and damage point, to cooldown time as well.
Set animation cast backswing and animaton cast point to -50 as well but it didn't change anything regarding attack ground.
Then even set blend time to -50. Same, not working sadly.
Uncle
Uncle
A negative value seems unwise unless you're banking on the fact that the code would clamp it to 0.00. I'd just use 0.00 or 0.01. Remember, you're essentially setting a Timer when defining these values. A timer with a -50 interval doesn't make much sense.
deepstrasz
deepstrasz
I see, although, attack ground doesn't work for some reason while crushing wave and simple attack works.
Uncle
Uncle
Can't say for certain but it could very well have some weird coded limitations
Top