Trigger : hero cant acttack ground unit.

Tyman2007

Ya Rly >.
Reaction score
74
Under the Combat section of the hero, look for Targets Allowed. Double click that field and uncheck the box that says "Ground".
 

Tyman2007

Ya Rly >.
Reaction score
74
Unfortunately, an attribute such as "Targets Allowed" is unable to be changed via trigger.

You can simulate it using this method.

Trigger:
  • Disable Ground Attacking
    • Events
      • Unit - A unit Is attacked (Generic Unit Event)
    • Conditions
      • (Unit-type of (Attacking unit)) Equal to (==) Archmage (Unit Type Comparison)
      • ((Attacked unit) is A ground unit) Equal to (==) True (Boolean, Classification Check)
    • Actions
      • Unit - Order (Attacking unit) to Stop (Issue Order With No Targer)


You can use Moridin's method and use Unit - Replace and replace it with the hero that can't attack ground units.

Replace is a complex function, and it will give the new hero everything that the old hero had.
 

Tyman2007

Ya Rly >.
Reaction score
74
Well, If that's what he wants it to do, that's what the trigger would do.

I'm going off what I think his question was.

I'm not too good with engrish :p
 

Moridin

Snow Leopard
Reaction score
144
Oh wait, I didn't read his question properly :p. Yes you're right, I thought he means you can't "attack ground".

+1 to tymans trigger. Though in the editor it will look like this:

Trigger:
  • Disable Ground Attacking
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Unit-type of (Attacking unit)) Equal to Archmage
      • ((Attacked unit) is A ground unit) Equal to True
    • Actions
      • Unit - Order (Attacking unit) to Stop
 

charin79

New Member
Reaction score
0
Oh wait, I didn't read his question properly :p. Yes you're right, I thought he means you can't "attack ground".

+1 to tymans trigger. Though in the editor it will look like this:

Trigger:
  • Disable Ground Attacking
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Unit-type of (Attacking unit)) Equal to Archmage
      • ((Attacked unit) is A ground unit) Equal to True
    • Actions
      • Unit - Order (Attacking unit) to Stop

is didnt work for me my Archmage hero still attack ground unit
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top