Kill all units on map problem.

KvickaN

TH.net Regular
Reaction score
24
So this is the problem...
When a player types -last hope, all purple units die but not the others.
Can anyone see whats wrong?

Code:
Add Sheeps To Unit Group
    Events
        Unit - A unit enters (Entire map)
    Conditions
        And - All (Conditions) are true
            Conditions
                (Unit-type of (Entering unit)) Not equal to Farm red
                (Unit-type of (Entering unit)) Not equal to Farm blue
                (Unit-type of (Entering unit)) Not equal to Farm teal
                (Unit-type of (Entering unit)) Not equal to Farm purple
    Actions
        Unit Group - Add (Last created unit) to Sheeps

Code:
Red Last hope
    Events
        Player - Player 1 (Red) types a chat message containing -last hope as An exact match
    Conditions
    Actions
        Sound - Play LastHope <gen>
        Game - Display to (All players) the text: |c00ff0303Red can n...
        Unit Group - Pick every unit in Sheeps and do (Actions)
            Loop - Actions
                Unit - Kill (Picked unit)
        Trigger - Turn off (This trigger)

And exactly the same for blue, teal and purple except:
Code:
Player - Player 1 (Red) types a chat message containing -last hope as An exact match
and
Code:
Game - Display to (All players) the text: |c00ff0303Red can n...
 

esb

Because none of us are as cruel as all of us.
Reaction score
329
Why not Pick every unit Matching unit type Sheep Red and Sheep Blue and Sheep Green, and Sheep purple and kill picked unit?
Or you can pick all sheep owned by red, blue, green, and purple, add them to the unit group one by one, and then kill.

But I don't know why only purple's sheeps are added.
 

KvickaN

TH.net Regular
Reaction score
24
Why not Pick every unit Matching unit type Sheep Red and Sheep Blue and Sheep Green, and Sheep purple and kill picked unit?
Or you can pick all sheep owned by red, blue, green, and purple, add them to the unit group one by one, and then kill.

But I don't know why only purple's sheeps are added.

Aight, I'll try that tomorrow :)

Nice you pulled of doing your avatar!
 

Shadow14l

New Member
Reaction score
11
Aight, I'll try that tomorrow :)

Nice you pulled of doing your avatar!

Code:
Pick all units in map matching: owner of matching unit is Player 4 (Purple) = to true (Boolean here for condition)

Kill picked unit

Why not try this?
 

cowmenace

New Member
Reaction score
22
i think your problem might be the "and" conditions, try changing them to "or" conditions.
WRONG EXAMPLE: If you say unit is not at region 1 AND unit is not at region 2 then he could be only in region 1 and the conditions have been met. for you, as long as the unit is not a farm red and a farm purple at the same time, conditions have been met, which means he could be only one type of house (i forget exactly what ur units where called)
CORRECT EXAMPLE: If you say unit is not in region 1 or not in region 2, then you are saying check if he's in region 1, then check if hes in region 2. by saying he is not a farm red or he is not a farm purple, you are doing the same for checking the unit.
Hope you understood
btw im not entirely sure about that

if that doesnt work or any other suggestions then please provide some details about the map, for example:
What units are added to the unit group sheep, only sheep units? or are there soldiers and other units in there too
what classification are the units that you want to be killed?

btw if there is one classification for all the units you want killed and they are the only ones classified as that, then pick all units of that classification and kill them
you can change classification in the object editor, for example you can change them all to undead, then pick all undead units and kill them. This won't change stats of the unit, it might have a cosmetic effect in game (it might display that the unit is undead, but who cares as long as the game plays)
another thing you can do is create a dummy in the middle of the map that has a buffed up war stomp and make the targets of war stomp a characteristic that only sheep have, then have him cast it and kill all the sheep when a player types -last hope
 

esb

Because none of us are as cruel as all of us.
Reaction score
329
Farm COLOR is a building, not a region :p
 

cowmenace

New Member
Reaction score
22
those were just examples of different conditions that could happen somewhere else, i wasnt implying that they were regions lol ignore the region part if you dont understand
 
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