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

Hero auto-attacking problem

Status
Not open for further replies.
Level 2
Joined
May 30, 2013
Messages
8
Does anyone know how to disable hero auto-attacking?
For example: My hero was hiding in a bush, an enemy unit went across (but it didn't see my hero) and then my hero attacked it.
 
Level 13
Joined
Mar 24, 2013
Messages
1,105
Making the unit a worker makes the idle button at the bottom left I think.
How about this--

  • stop auto attack
    • Events
      • Unit - A unit enters Bush <gen>
    • Conditions
    • Actions
      • Unit - Set (Triggering unit) acquisition range to 1.00
  • Enable autoattack
    • Events
      • Unit - A unit leaves Bush <gen>
    • Conditions
    • Actions
      • Unit - Set (Triggering unit) acquisition range to (Default acquisition range of (Triggering unit))
 
Level 21
Joined
Mar 27, 2012
Messages
3,232
There's one other way
Make a modified silence ability that disables attacks, but not spells.
Make it so that whenever a unit enters a bush you cast that silence on it.
Make the silence last long.
Make it so the silence buff is removed when unit leaves buff.

Note that in this case it's good to also make a custom buff.
 
Level 13
Joined
Mar 24, 2013
Messages
1,105
@ Undead
I'm sorry, I don't understand. Are you saying if the unit is within that 1 range of acquisition?
Edit:
Ohhhhh. If its a ranged unit. You can still attack at whatever their range is I believe, you just have to order the attack.


@Xonok I think he wants the unit to still be able to attack from the bush, just not auto attack from it, they would like the user to decide when to "reveal" oneself.
 
Status
Not open for further replies.
Top