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

[Solved] Prevent from auto attack

Status
Not open for further replies.
Level 10
Joined
May 28, 2011
Messages
455
So, i have 1 unit which remain as statue but transform if attacked.

The problem is whenever other unit stand close to this unit. it attack.

It allows the unit to attack, but not automatically. Only ordering the unit to attack. So what should i change?

Change acquisition range may not be very suitable...
 
Level 3
Joined
Aug 6, 2011
Messages
39
Click twice on the statue and change the owner to Neutral passive, them create an action to change the owner of the unit when the unit is attacked.(Probably Neutral Hostile)
 
Level 17
Joined
Nov 13, 2006
Messages
1,814
So, i have 1 unit which remain as statue but transform if attacked.

The problem is whenever other unit stand close to this unit. it attack.

It allows the unit to attack, but not automatically. Only ordering the unit to attack. So what should i change?

Change acquisition range may not be very suitable...

not the best methode but u can use something like this

  • Unable attack
    • Events
      • Unit - A unit Is attacked
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Attackable Equal to True
        • Then - Actions
          • Set Attackable = False
        • Else - Actions
          • Unit - Order (Attacking unit) to Stop
  • Order attack
    • Events
      • Unit - A unit Is issued an order targeting an object
    • Conditions
      • ((Target unit of issued order) belongs to an enemy of (Owner of (Attacking unit))) Equal to True
    • Actions
      • Set Attackable = True
another ideea change silence ability to prevent attack, cast on ur unit then if u order to attack somebody then remove it and put back again
 
Level 3
Joined
Aug 6, 2011
Messages
39
Why not just make it if the unit is attacking the statue,order the unit to stop?(I don't have WE on me)
Event - a unit is attacked
condition - attacked unit = to statue unit
action - order attacking unit to stop

Either that or make the statue invulnerable so no one can auto attack it?

Did you read what he said?
 
Level 3
Joined
Aug 6, 2011
Messages
39
"eh i want to prevent the unit to auto attacking the statue" Yeah I read what he said.

No you didn't, if you actually did read, you would see this:

It allows the unit to attack, but not automatically. >>"Only ordering the unit to attack."<< So what should i change?

Sounds familiar? I guess not, because you didn't read.

Well.. He doesn't need help anymore ? Isn't he going to ask to close the thread ? Because, he kinda disappeared..
 
Status
Not open for further replies.
Top