• 🏆 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!

[Spell Help] Two quick Questions

Status
Not open for further replies.
Level 3
Joined
Jul 29, 2006
Messages
61
First off: I understand GUI and basic JASS.

#1. I'm making a spell off searing arrows for a melee hero. I can't seem to get him to autocast the spell. Any suggestions? (More details can be given if needed.)

#2. Is their anyway to order a unit to patrol click on a unit? This, in effect, makes a unit follow the unit, and attack anything that the hero attacks. If I can't patrol click on a unit, what is the best workaround?

Thanks for your time. I'm hoping for a nice, quick response. If more info is needed, just notify me.
 
Level 40
Joined
Dec 14, 2005
Messages
10,532
#1. I'm making a spell off searing arrows for a melee hero. I can't seem to get him to autocast the spell. Any suggestions? (More details can be given if needed.)
I assume it only works on ranged units.

Way one;

make the unit's attack type Missile, not Melee. This will have some problems with stuff like Thorns Aura, but otherwise will work.

Way two; detect when the player activates/deactivates the spell, store the state, and add the damage via triggers when the target takes damage, if it's active

#2. Is their anyway to order a unit to patrol click on a unit? This, in effect, makes a unit follow the unit, and attack anything that the hero attacks. If I can't patrol click on a unit, what is the best workaround?
I don't think so. Try ordering "patrol" to the other unit, however, that may not work.

You could, however, make them constantly attack to the position of the patrol-clicked unit
 
Level 3
Joined
Jul 29, 2006
Messages
61
I assume it only works on ranged units.

Way one;

make the unit's attack type Missile, not Melee. This will have some problems with stuff like Thorns Aura, but otherwise will work.

Way two; detect when the player activates/deactivates the spell, store the state, and add the damage via triggers when the target takes damage, if it's active
I'll Try Way 1. I'm not planning on including Thorns Aura anyway.
Edit: That Doesn't work.
Way 2 sounds overly complicated. I might just want to try another autocast to base it off of. I'm Going for MUI here.

I don't think so. Try ordering "patrol" to the other unit, however, that may not work.
I'll give that a try, but I Doubt it as well.

Edit: Miraculously, this Worked.
 
Level 40
Joined
Dec 14, 2005
Messages
10,532
I'll give that a try, but I Doubt it as well.

Edit: Miraculously, this Worked.
Haha, I doubted that would work too

Way 2 sounds overly complicated. I might just want to try another autocast to base it off of. I'm Going for MUI here.
Attaching it to the unit with the Handle Vars or something similar would be MUI. It may be complicated, but if Way 1 doesn't work then I don't know how else you would go about this.

Unless you want it to show up on the UI (damage), I suppose. If so, you could have an ability based off Claws of Attack that you add/remove when the unit activates/deactivates the spell. This could have problems when you have no mana, though.
 
Level 3
Joined
Jul 29, 2006
Messages
61
Haha, I doubted that would work too

Attaching it to the unit with the Handle Vars or something similar would be MUI. It may be complicated, but if Way 1 doesn't work then I don't know how else you would go about this.

Unless you want it to show up on the UI (damage), I suppose. If so, you could have an ability based off Claws of Attack that you add/remove when the unit activates/deactivates the spell. This could have problems when you have no mana, though.

If I was to do it that way I'd likely make it into a buff spell for simplicity.

edit: I might have a solution, I'm redoing the spell off Parasite. If this works then theres no problem. If not, I'll re-edit
Edit2: Parasite Fixed it.
 
Last edited:
Status
Not open for further replies.
Top