• 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.

Auto-spell for Nonattacking units

Status
Not open for further replies.
Level 2
Joined
Dec 10, 2010
Messages
16
Hello there, I'm new to map-making and I just wanted to ask.

How do you make a non-attacking unit (let's say Male Villager) use a spell (let's say Crushing Wave or even Cripple) use his spells when attacked rather than run away?

Clarified: How to make the unit use a damaging or opponent buffing spell rather than run away whenever attacked?
 
Level 5
Joined
Feb 21, 2009
Messages
136
  • HiThere
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Unit-type of (Attacked unit)) Equal to Villager (Male)
    • Actions
      • Unit - Order (Attacked unit) to Undead Necromancer - Cripple (Attacking unit)
The Villager will need cripple though
and of course the requirements and mana ect.
 

Vunjo

Hosted Project: SC
Level 19
Joined
Jul 1, 2010
Messages
1,340
If you want a unit to cast a spell on it every time, then simply nuke those spells =)
If you want a unit just to be near the enemy doing "nothing", then every X seconds of the game order that unit to move to attacker
 
Level 2
Joined
Dec 10, 2010
Messages
16
Well, let me just make this clear. I want a neutral non-attacking unit fight back the attacker with a random spell he has and keep doing so until the attacker dies (or becomes undetectable like Wind Walk)
 
Well, let me just make this clear. I want a neutral non-attacking unit fight back the attacker with a random spell he has and keep doing so until the attacker dies (or becomes undetectable like Wind Walk)

then use post #2

Read the first post clearly..

CAN a NON-ATTACKABLE unit AUTOMATICALLY fight back with spell?
An unit that can't attack will run awayinstead of fighting back automatically.

its says "non-attacking unit" NOT 'NON-ATTACKABLE unit'
 
Status
Not open for further replies.
Top