Multiple killing triggers

idk_a_name

ABC GUM :D
Reaction score
43
O.K I have a few problems with my map.

First, I have units spawning from 2 sides of the map. When they spawn I order them to patrol to a line, thus making them attack any enemy they see on the way. But if they kill a unit they stop patrolling.

Second, If the units that are patrolling make it to a certain region they are ordered to attack a gate. I have made sure that only computer owned units will attack the gate, but when a player controlled hero enters the region it attacks the gate anyways
Code:
attack
    Events
        Unit - A unit enters West side patrol stop <gen>
    Conditions
    Actions
        Player Group - Pick every player in (All players controlled by a Computer player) and do (Actions)
            Loop - Actions
                Unit - Order (Entering unit) to Attack City Gate (Horizontal) 0269 <gen>

Third, Once the units destroy the gate they are ordered to attack another tower. But instead, after they kill the gate they just patrol back and forth and some go run back to the spawn points. I made it so that only units that are controlled by brown (the color of the spawned units) to attack the tower.
Code:
Attack King
    Events
        Destructible - City Gate (Horizontal) 0269 <gen> dies
    Conditions
    Actions
        Player Group - Pick every player in Player Group - Player 12 (Brown) and do (Actions)
            Loop - Actions
                Unit - Order (Matching) to Attack King Proudmoore 0022 <gen>

Please help if you can, I've been trying to figure out how to fix it for awhile. There are possible more leaks and problems I have, but these are the only ones I can find right now.
 

Naminator

Coming Back To Life
Reaction score
76
O.K I have a few problems with my map.

First, I have units spawning from 2 sides of the map. When they spawn I order them to patrol to a line, thus making them attack any enemy they see on the way. But if they kill a unit they stop patrolling.

Second, If the units that are patrolling make it to a certain region they are ordered to attack a gate. I have made sure that only computer owned units will attack the gate, but when a player controlled hero enters the region it attacks the gate anyways
attack
Events
Unit - A unit enters West side patrol stop <gen>
Conditions
Actions
Player Group - Pick every player in (All players controlled by a Computer player) and do (Actions)
Loop - Actions
Unit - Order (Entering unit) to Attack City Gate (Horizontal) 0269 <gen>

Third, Once the units destroy the gate they are ordered to attack another tower. But instead, after they kill the gate they just patrol back and forth and some go run back to the spawn points. I made it so that only units that are controlled by brown (the color of the spawned units) to attack the tower.
Attack King
Events
Destructible - City Gate (Horizontal) 0269 <gen> dies
Conditions
Actions
Player Group - Pick every player in Player Group - Player 12 (Brown) and do (Actions)
Loop - Actions
Unit - Order (Matching) to Attack King Proudmoore 0022 <gen>

Please help if you can, I've been trying to figure out how to fix it for awhile. There are possible more leaks and problems I have, but these are the only ones I can find right now.

In the first and second trigger you Pick A Player, you want to pick a unit. Not a player
 

Darkchaoself

What is this i dont even
Reaction score
106
One, There is a reason for
Code:
 tags. Not spoilers.

Second, the patrolling could be the AI, is the Computer Neutral Hostile? And do you still have the AI ran at the start?

And why not do
[code]attack
Events
Unit - A unit enters West side patrol stop <gen>
Conditions-Owner of Triggering Unit is an Ally of Player 12(Brown) equal to true
Actions
Unit - Order (Entering unit) to Attack City Gate (Horizontal) 0269 <gen>
 

Ghan

Administrator - Servers are fun
Staff member
Reaction score
888
> But if they kill a unit they stop patrolling.

I suppose you could use a periodic trigger that picks every unit with whatever conditions, and if the unit's current order is equal to "none", order it to patrol.

On your first trigger, why do you do a Pick Every Unit, then use Entering Unit? You should probably just use the Order Entering Unit part and leave off the loop.

In your second trigger, Matching Unit should be Picked Unit since you're inside a loop.
 

Darkchaoself

What is this i dont even
Reaction score
106
Ahhh i beat Ghan! WEWT!All your helping to me is paying off :p

>In your second trigger, Matching Unit should be Picked Unit since you're inside a loop.

Didnt notice that. And yea, you dont need some of those trigs.
 
M

MikeTheGuy

Guest
> But if they kill a unit they stop patrolling.

I suppose you could use a periodic trigger that picks every unit with whatever conditions, and if the unit's current order is equal to "none", order it to patrol.

Wouldn't it be easier to just make a trigger like this (sorry for freehanding it, don't have WE up):

Code:
Events - A unit dies
Conditions - Killing unit owned by (whoever owns the units you want to patrol)
Actions - Order Killing Unit to Patrol to (wherever you need them to)

That sounds like it would work to me but I'm a novice at this so I might have left some stuff out.
 

Ghan

Administrator - Servers are fun
Staff member
Reaction score
888
> Wouldn't it be easier to just make a trigger like this (sorry for freehanding it, don't have WE up):

Yeah. That could work.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top