Hey.
I got a problem with my leaderboard.
I have a row to show how many units thats in a region.
Let's say theres 12 units in the region and it will show 12 on the board, and if one more enter it goes up to 13. If he leaves it goes back to 12. But if he dies, it wont negative a value, so it will still show 13 and if he revive and go to the region again it will add again and so on.
I've tried to add another trigger that says that if a unit dies in the region it will negative the number too but didnt work.
Sorry if its hard to understand.
So I assume you have two triggers set up like....
Unit Enters Region - Add 1, update leaderboard
Unit Leaves Region - Subtract 1, update leaderboard
So then when a unit dies its not actually leaving the region, so it will not change the leaderboard. You could fix this by doing one of two things:
-First, make a trigger with Event - Unit Dies, Condition - Unit in Region (use triggering unit), Action-Update Leaderboard
-The other thing you could do is append this bit to your Unit Enters Region trigger after adding 1 to the leaderboard: do a Wait for Conditions. Have the condition be Unit Group Is Dead, covert the triggering unit to unit group OR Unit leaves region and then following that Wait you want to subtract 1 from the leaderboard again. Hope this helps.
condition: -or, owner of trigger unit 1, owner of trigger unit 2 etc
actions:
-variable - modify "unit in region"[triggering player] +1
-leaderboard - set board item text at column 1 and row 1 to (text(unit in region[(triggering player)))
2nd:
event: any unit leaves "region" condition: -or, owner of trigger unit 1, owner of trigger unit 2 etc
actions:
-variable - modify "unit in region"[triggering player] -1
-leaderboard - set board item text at column 1 and row 1 to (text(unit in region[(triggering player)))
3rd:
event: any unit dies condition: and,
-unit attached to map = triggering unit -or, owner of trigger unit 1, owner of trigger unit 2 etc
actions:
-variable - modify "unit in region"[triggering player] -1
-leaderboard - set board item text at column 1 and row 1 to (text(unit in region[(triggering player)))
----
As I said, when a unit leaves a region it works fine, but when he is in the region and die it wont remove.
Your problem is the 3rd trigger has "Unit attached to region". This is incorrect. You have to individually attach every unit to that region for this to work and I don't think this is what you want. You want to do what they said to do.
Are you actually attaching a unit to the region? It doesn't look like it to me. Why is that condition even there?
Also, just select all your triggers and choose "copy as text". Then paste here. That way we can see exactly what your triggers look like, and you don't have to type them all out.
Rollback Post to RevisionRollBack
Feel free to Send me a PM if you have any questions/concerns!
Cause i dont want all unit to count, only a few of the units you can choose should trigger it. I tried without that condition first but that didnt work either. I Will paste the triggers when im home from work.
Players team2 alive
Events
Unit - Any Unit Enters map
Local Variables
Conditions
And
Conditions
Or
Conditions
(Owner of (Triggering unit)) == 3
(Owner of (Triggering unit)) == 4
Or
Conditions
((Triggering unit) is Required: Heroic; Excluded: Missile, Dead for player 3) == true
((Triggering unit) is Required: Heroic; Excluded: Missile, Dead for player 4) == true
Actions
Variable - Modify Team 2 alive[(Triggering player)]: + 1
Leaderboard - Set teamscore item text at column 2 and row 3 to (Text(Team 2 alive[(Triggering player)]))
Players team2 dead
Events
Unit - Any Unit Leaves map
Local Variables
Conditions
And
Conditions
Or
Conditions
(Owner of (Triggering unit)) == 3
(Owner of (Triggering unit)) == 4
Or
Conditions
((Triggering unit) is Required: Heroic; Excluded: Missile, Dead for player 3) == true
((Triggering unit) is Required: Heroic; Excluded: Missile, Dead for player 4) == true
Actions
Variable - Modify Team 2 alive[(Triggering player)]: - 1
Leaderboard - Set teamscore item text at column 2 and row 3 to (Text(Team 2 alive[(Triggering player)]))
Players team2 dead 2
Events
Unit - Any Unit dies
Local Variables
Conditions
And
Conditions
Or
Conditions
(Owner of (Triggering unit)) == 3
(Owner of (Triggering unit)) == 4
Or
Conditions
((Triggering unit) is Required: Heroic; Excluded: Missile, Dead for player 3) == true
((Triggering unit) is Required: Heroic; Excluded: Missile, Dead for player 4) == true
Actions
Variable - Modify Team 2 alive[(Triggering player)]: - 1
Leaderboard - Set teamscore item text at column 2 and row 3 to (Text(Team 2 alive[(Triggering player)]))
Hey. I got a problem with my leaderboard. I have a row to show how many units thats in a region. Let's say theres 12 units in the region and it will show 12 on the board, and if one more enter it goes up to 13. If he leaves it goes back to 12. But if he dies, it wont negative a value, so it will still show 13 and if he revive and go to the region again it will add again and so on. I've tried to add another trigger that says that if a unit dies in the region it will negative the number too but didnt work. Sorry if its hard to understand.
This would be the logical solution and should work, would you mind posting your triggers?
Another possibility would be to periodically count the units in the area and update the leaderboard accordingly.
@Lucyher: Go
So I assume you have two triggers set up like.... Unit Enters Region - Add 1, update leaderboard Unit Leaves Region - Subtract 1, update leaderboard
So then when a unit dies its not actually leaving the region, so it will not change the leaderboard. You could fix this by doing one of two things:
-First, make a trigger with Event - Unit Dies, Condition - Unit in Region (use triggering unit), Action-Update Leaderboard
-The other thing you could do is append this bit to your Unit Enters Region trigger after adding 1 to the leaderboard: do a Wait for Conditions. Have the condition be Unit Group Is Dead, covert the triggering unit to unit group OR Unit leaves region and then following that Wait you want to subtract 1 from the leaderboard again. Hope this helps.
@peranzormal: Go
I have 3 trigger, first one:
-or, owner of trigger unit 1, owner of trigger unit 2 etc
-variable - modify "unit in region"[triggering player] +1
-leaderboard - set board item text at column 1 and row 1 to (text(unit in region[(triggering player)))
2nd:
event: any unit leaves "region"
condition:
-or, owner of trigger unit 1, owner of trigger unit 2 etc
-variable - modify "unit in region"[triggering player] -1
-leaderboard - set board item text at column 1 and row 1 to (text(unit in region[(triggering player)))
3rd:
event: any unit dies
condition: and,
-unit attached to map = triggering unit
-or, owner of trigger unit 1, owner of trigger unit 2 etc
-variable - modify "unit in region"[triggering player] -1
-leaderboard - set board item text at column 1 and row 1 to (text(unit in region[(triggering player)))
----As I said, when a unit leaves a region it works fine, but when he is in the region and die it wont remove.
@Lucyher: Go
Your problem is the 3rd trigger has "Unit attached to region". This is incorrect. You have to individually attach every unit to that region for this to work and I don't think this is what you want. You want to do what they said to do.
@yukaboy: Go
I tried to attach the unit I tested it with, still didnt work :(
@Lucyher: Go
-unit attached to map = triggering unit
Are you actually attaching a unit to the region? It doesn't look like it to me. Why is that condition even there?
Also, just select all your triggers and choose "copy as text". Then paste here. That way we can see exactly what your triggers look like, and you don't have to type them all out.
@zeldarules28: Go
Cause i dont want all unit to count, only a few of the units you can choose should trigger it. I tried without that condition first but that didnt work either. I Will paste the triggers when im home from work.
Players team2 alive
Events
Unit - Any Unit Enters map
Local Variables
Conditions
And
Conditions
Or
Conditions
(Owner of (Triggering unit)) == 3
(Owner of (Triggering unit)) == 4
Or
Conditions
((Triggering unit) is Required: Heroic; Excluded: Missile, Dead for player 3) == true
((Triggering unit) is Required: Heroic; Excluded: Missile, Dead for player 4) == true
Actions
Variable - Modify Team 2 alive[(Triggering player)]: + 1
Leaderboard - Set teamscore item text at column 2 and row 3 to (Text(Team 2 alive[(Triggering player)]))
Players team2 dead
Events
Unit - Any Unit Leaves map
Local Variables
Conditions
And
Conditions
Or
Conditions
(Owner of (Triggering unit)) == 3
(Owner of (Triggering unit)) == 4
Or
Conditions
((Triggering unit) is Required: Heroic; Excluded: Missile, Dead for player 3) == true
((Triggering unit) is Required: Heroic; Excluded: Missile, Dead for player 4) == true
Actions
Variable - Modify Team 2 alive[(Triggering player)]: - 1
Leaderboard - Set teamscore item text at column 2 and row 3 to (Text(Team 2 alive[(Triggering player)]))
Players team2 dead 2
Events
Unit - Any Unit dies
Local Variables
Conditions
And
Conditions
Or
Conditions
(Owner of (Triggering unit)) == 3
(Owner of (Triggering unit)) == 4
Or
Conditions
((Triggering unit) is Required: Heroic; Excluded: Missile, Dead for player 3) == true
((Triggering unit) is Required: Heroic; Excluded: Missile, Dead for player 4) == true
Actions
Variable - Modify Team 2 alive[(Triggering player)]: - 1
Leaderboard - Set teamscore item text at column 2 and row 3 to (Text(Team 2 alive[(Triggering player)]))
Add the registered units entering the region to a unit group, remove leaving units. If a dying unit is in the group, reduce the score.
Thanks all. Fixed it finally.