• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

How to silence a unit and make it unable to attack when it enters a region ?

Status
Not open for further replies.
Level 30
Joined
Nov 29, 2012
Messages
6,637
I want to silence a unit if it enters a particular region. I want to disable its spells and want to make it unable to attack ? How do i do that ?

I dont know yet for making it unable to attack but for the Silence.. here:

  • Untitled Trigger 001
    • Events
      • Unit - A unit enters Region 000 <gen>
    • Conditions
    • Actions
      • Unit - Create 1 Footman for Player 1 (Red) at (Position of (Entering unit)) facing Default building facing degrees
      • Set Unit = (Last created unit)
      • Unit - Add Silence to Unit
      • Unit Group - Pick every unit in (Units in Region 000 <gen>) and do (Actions)
        • Loop - Actions
          • Unit - Order Unit to Neutral Dark Ranger - Silence (Position of (Picked unit))
For example our dummy unit is a Footman but with no model so it will not be noticeable when it casts a Silence. When a unit enters the Region you want, Create the Footman Dummy and set a variable for him as the last created unit. Add Silence Ability to him but make sure it has no cooldown and also mana cost. Now pick every units in the Region you want and Order the Footman Dummy to Silence the position of Picked Unit.....

Also make sure that the Silence's AOE covers all of the region so all units in that Region will be affected!
 
Level 30
Joined
Nov 29, 2012
Messages
6,637
Silencing a unit doesn't make it unable to attack. It only becomes unable to cast spells. It can still attack others !

Well, only way I can think of is when the unit enters the region replace it with a unit same as the entering unit but has no attack. How to do? It is hard because you will have to make units in Object Editor for all of the units in your game without the Attack and in trigger just replace the entering unit with its corresponding units with no attack. To turn it back again to normal... same process. I cant much explain this in triggers.
 
Level 5
Joined
May 12, 2013
Messages
70
I dont know yet for making it unable to attack but for the Silence.. here:

  • Untitled Trigger 001
    • Events
      • Unit - A unit enters Region 000 <gen>
    • Conditions
    • Actions
      • Unit - Create 1 Footman for Player 1 (Red) at (Position of (Entering unit)) facing Default building facing degrees
      • Set Unit = (Last created unit)
      • Unit - Add Silence to Unit
      • Unit Group - Pick every unit in (Units in Region 000 <gen>) and do (Actions)
        • Loop - Actions
          • Unit - Order Unit to Neutral Dark Ranger - Silence (Position of (Picked unit))
For example our dummy unit is a Footman but with no model so it will not be noticeable when it casts a Silence. When a unit enters the Region you want, Create the Footman Dummy and set a variable for him as the last created unit. Add Silence Ability to him but make sure it has no cooldown and also mana cost. Now pick every units in the Region you want and Order the Footman Dummy to Silence the position of Picked Unit.....

Also make sure that the Silence's AOE covers all of the region so all units in that Region will be affected!

Since the created unit- Footman is for Player 1, i don't suppose it would silence a player 1 unit in that region ? So if i want to silence a player 1 unit, i will have to create the dummy unit for another player? Right ?
 
Level 30
Joined
Nov 29, 2012
Messages
6,637
Since the created unit- Footman is for Player 1, i don't suppose it would silence a player 1 unit in that region ? So if i want to silence a player 1 unit, i will have to create the dummy unit for another player? Right ?

That is just an example trigger, try making it a neutral hostile or maybe Passive but make sure it has no attack so it will not attack the units and make it cast it and remove after it casts.
 
Level 28
Joined
Sep 26, 2009
Messages
2,520
You can use modified Cloud ability. That can prevent spells, melee and ranged; it is also channeled ability. You can try to set duration to 0, make a dummy unit and upon start of map, order it to cast Cloud in your specific point.

That way you may have a certain region temporarily disable attacks as long as unit remains in that region.

Good thing is you can also modify effect of that ability so it doesn't show that fog/cloud, but it may show certain efx so players will know which region will disable their attacks.
 
Status
Not open for further replies.
Top