Well, that's weird. Anyway, I did put in OR now, and I did try it like this before. Still doesn't work.
General - If (Conditions) then do (Actions) else do (Actions)
If
(Unit type of (Triggering unit)) == Supply Depot
Or
Conditions
(Unit type of (Triggering unit)) == Supply Depot (Lowered)
Or
Conditions
(Unit type of (Triggering unit)) == Spire
Then
Variable - Modify Buildingkills[(Killing player)]: + 1
UI - Display (Text(Buildingkills[(Killing player)])) for (Player group((Killing player))) to Error area
Else
Variable - Modify Unitkills[(Killing player)]: + 1
UI - Display (Text(Unitkills[(Killing player)])) for (Player group((Killing player))) to Objective area
I tried Unit - Any Unit enters a distance of 15.0 from (Closest unit to (Position of heroes[1]) in (Any units in (Entire map) owned by player Any Player matching No Unit Filter, with at most Any Amount))
and it did work. Just the way I wanted. But this seems to be a little too "static".. Ill have to make a bunch of triggers for each team then?
Another issue I have is, I have 2 enemies on the map, when I enter distance of 15 for the closest enemy upon start, it works, but when I move away from him and enter distance of 15 to the second enemy, nothing happens. Does it mean that I have to "refresh" this function and run it, say every 1 sec?
Thanks.
Edit: Also could you explain the "Search Area effect"?
Unit - heroes[(Triggering player)] Enters a distance of 15.0 from (Closest unit to (Position of heroes[(Triggering player)]) in (Any units in (Entire map) owned by player Any Player matching No Unit Filter, with at most Any Amount))
Note that
Unit - heroes[(Triggering player)] Enters a distance of 15.0 From Unit: Immortal [67.36, 64.04]
works perfectly, but as soon as I add any form of variable, it doesn't work.
Heroes is an array of units that each player own (player only owns one unit).
Hi.
Im making a map where unit get minerals for being within range to an enemy unit. At the moment, I use
Unit Enters/Leaves Range Of Unit
Unit: Any Unit
State: Enters
Range: 15.0
From Unit: Immortal [67.36, 64.04]
But there are 2 problems with this, first of all, this only works when I enter range of the one spesific unit, how can I set this to "Any unit enters within 15 range from Nearest enemy unit"?
Another issue I have, how can I make the range a variable? The variable I wanna use is the attack range of the nearest enemy unit.
0
[Edit]
0
AWESOME! Thanks!
0
Well, that's weird. Anyway, I did put in OR now, and I did try it like this before. Still doesn't work.
General - If (Conditions) then do (Actions) else do (Actions)
If
(Unit type of (Triggering unit)) == Supply Depot
Or
Conditions
(Unit type of (Triggering unit)) == Supply Depot (Lowered)
Or
Conditions
(Unit type of (Triggering unit)) == Spire
Then
Variable - Modify Buildingkills[(Killing player)]: + 1
UI - Display (Text(Buildingkills[(Killing player)])) for (Player group((Killing player))) to Error area
Else
Variable - Modify Unitkills[(Killing player)]: + 1
UI - Display (Text(Unitkills[(Killing player)])) for (Player group((Killing player))) to Objective area
0
Unit kill Events Unit - Any Unit dies
Local Variables
Conditions
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
(Unit type of (Triggering unit)) == Supply Depot
(Unit type of (Triggering unit)) == Supply Depot (Lowered)
(Unit type of (Triggering unit)) == Spire
Then
Variable - Modify Buildingkills[(Killing player)]: + 1
UI - Display (Text(Buildingkills[(Killing player)])) for (Player group((Killing player))) to Error area
Else
Variable - Modify Unitkills[(Killing player)]: + 1
UI - Display (Text(Unitkills[(Killing player)])) for (Player group((Killing player))) to Objective area
This is what Im currently having, the Unit kill count works just awesome. But Buildings are still counted with the units.
Since the even is "Any Unit Dies" I figured that the unit who died would be the Triggering unit?
And this doesnt work. Ideas?
0
This. Is. Awesome! THANKS!
This is just what I've been looking for, thanks a lot! Topic solved.
Thanks! =)
0
Hi, thanks a lot for replying:)
I tried Unit - Any Unit enters a distance of 15.0 from (Closest unit to (Position of heroes[1]) in (Any units in (Entire map) owned by player Any Player matching No Unit Filter, with at most Any Amount))
and it did work. Just the way I wanted. But this seems to be a little too "static".. Ill have to make a bunch of triggers for each team then?
Another issue I have is, I have 2 enemies on the map, when I enter distance of 15 for the closest enemy upon start, it works, but when I move away from him and enter distance of 15 to the second enemy, nothing happens. Does it mean that I have to "refresh" this function and run it, say every 1 sec?
Thanks.
Edit: Also could you explain the "Search Area effect"?
0
So this is what I recently did;
Unit - heroes[(Triggering player)] Enters a distance of 15.0 from (Closest unit to (Position of heroes[(Triggering player)]) in (Any units in (Entire map) owned by player Any Player matching No Unit Filter, with at most Any Amount))
Note that
Unit - heroes[(Triggering player)] Enters a distance of 15.0 From Unit: Immortal [67.36, 64.04]
works perfectly, but as soon as I add any form of variable, it doesn't work. Heroes is an array of units that each player own (player only owns one unit).
Ideas?
0
Hi. Im making a map where unit get minerals for being within range to an enemy unit. At the moment, I use
Unit Enters/Leaves Range Of Unit Unit: Any Unit State: Enters Range: 15.0 From Unit: Immortal [67.36, 64.04]
But there are 2 problems with this, first of all, this only works when I enter range of the one spesific unit, how can I set this to "Any unit enters within 15 range from Nearest enemy unit"?
Another issue I have, how can I make the range a variable? The variable I wanna use is the attack range of the nearest enemy unit.
Any thoughts?
Thanks in advance.