Target

Quauhtli

I have the right to remain silent.
Reaction score
62
If you make three units attack only one other of those units and you make this seperated by using air / ancient / structure , do you also need to add Ground to all of them? Or something else? Because it doesn't work for me (at least the group that kills ancient can't attack them.
 

FhelZone

Have a drink of a nice cold mellowberry juice!
Reaction score
103
Depends on your setting.
It is in your unit I think.
Remove the field targeted as "Ground"
 

Quauhtli

I have the right to remain silent.
Reaction score
62
The First one has Targeted as Ancient and Targets Allowed Structure, Item (they also are allowed to destroy items). The second one has Targeted as Air and Targets Allowed Ancient, Item. The Third one has Targeted as Structure and Targets Allowed AIr.

So..
 

C0mput3r

New Member
Reaction score
20
A different solution

Ok, ive never gotten into the classification fields (much). So why dont you do it with triggers? It should be really easy with triggers.

Say you dont want knights to attack footmen. See Below
Code:
Untitled Trigger 001
    Events
        Unit - A unit Is attacked
    Conditions
        And - All (Conditions) are true
            Conditions
                (Unit-type of (Attacked unit)) Equal to Footman
                (Unit-type of (Attacking unit)) Not equal to Knight
    Actions
        Unit - Order (Attacking unit) to Stop

Edit: Um i think both would work. Warcraft Triggers are done with very little delay 0.0025?
 

Quauhtli

I have the right to remain silent.
Reaction score
62
That will still not do something because people will still have done little damage which is already enough... The third one has 1 hp. So if the first one attacks the third one which is not what he should do, the third one dies anyway, it's to late to stop.

EDIT: Perhaps with Is Issued An Order To Attack ?
So does this work then?
Code:
Attack
    Events
        Unit - A unit Is issued an order targeting an object
    Conditions
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Unit-type of (Triggering unit)) Equal to Seeker
                (Unit-type of (Target unit of issued order)) Equal to Prisoner
            Then - Actions
                Unit - Order (Triggering unit) to Stop
                Game - Display to (All players) for 1.00 seconds the text: Note: Seekers can n...
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Unit-type of (Triggering unit)) Equal to Prisoner
                (Unit-type of (Target unit of issued order)) Equal to Prisoner
            Then - Actions
                Unit - Order (Triggering unit) to Stop
                Game - Display to (All players) for 1.00 seconds the text: Note: Prisoners can...
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Unit-type of (Triggering unit)) Equal to Prisoner
                (Unit-type of (Target unit of issued order)) Equal to Hider
            Then - Actions
                Unit - Order (Triggering unit) to Stop
                Game - Display to (All players) for 1.00 seconds the text: Note: Prisoners can...
            Else - Actions
 

C0mput3r

New Member
Reaction score
20
Im guessing it would work. However, if it's too slow it might have something to do with the multiple if/then/else. If its still a bit slow, try making seperate triggers with 1 if/then/else each.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top