@SouLCarveRR: Go
if i had posted the complete trigger you would have find my mistake i guess :D Thanks for having a look at it anyway!
Mistake was:
I was referring to "triggered region" but had a periodic event (changed this some time ago >.<), so i guess the whole map was the "triggering region" ...
--
concerning my use of logic: imo it is quite ok for this, because it does the following thing:
I have an array storing the "ownership" of regions.
Values range 0 ... 30, while 0..9 ist owned by TeamA, 10..20 is neutral and 21...30 is TeamB
A periodic event adds -1, 0 or 1 to the ownership (min 0, max 30)
only TeamA inside region: -1
only TeamB inside region: +1
TeamA and B or no units: ± 0
So it does not make any difference if Red/Blue are false or true if they have the same value ;)-
your debug idea is great, i already added some debug text messages but quite ineffective :D
I have implemented a hero-selection-system before.
As long as i did not choose a unit, the trigger works fine.
If a unit is created after selection, the trigger is broken. After this units death, the triggers work fine again.
I'm going to try a few things, if i cant find any solution i will post the complete map ...
I am creating a map in wich players have to conquer regions.
I need to know if TeamA and/or TeamB have units placed in those regions or not.
I created a trigger picking all units inside the specific region. Owners of units are checked.
If a unit is owned by any player of TeamA a variable ("blue") is set to true, saying there is a unit of teamA inside the region.
Same for TeamB, second boolean variable ("red") storing wether there is a unit of teamB inside or not.
The problem:
This method ALWAYS find a unit owned by TeamA inside a region even if there is no unit of any team inside
Units of TeamB are recognized correctly
Troubleshooting (only one change at a time):
- i disabled the check for units of player 1 -> WORKED
- i deleted every unit/doodad/etc inside the region -> broken
- i changed the location of the region ->broken
Looks like the problem is, that my triggers always find a unit owned by player 1 inside a region.
I have no idea why.
I would be happy about any advice!
Thanks!
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
@SouLCarveRR: Go if i had posted the complete trigger you would have find my mistake i guess :D Thanks for having a look at it anyway!
Mistake was: I was referring to "triggered region" but had a periodic event (changed this some time ago >.<), so i guess the whole map was the "triggering region" ...
-- concerning my use of logic: imo it is quite ok for this, because it does the following thing:I have an array storing the "ownership" of regions. Values range 0 ... 30, while 0..9 ist owned by TeamA, 10..20 is neutral and 21...30 is TeamB A periodic event adds -1, 0 or 1 to the ownership (min 0, max 30)
only TeamA inside region: -1 only TeamB inside region: +1 TeamA and B or no units: ± 0
So it does not make any difference if Red/Blue are false or true if they have the same value ;)
-your debug idea is great, i already added some debug text messages but quite ineffective :Dseems like the problem is located anywhere else.
I have implemented a hero-selection-system before.
As long as i did not choose a unit, the trigger works fine. If a unit is created after selection, the trigger is broken. After this units death, the triggers work fine again.
I'm going to try a few things, if i cant find any solution i will post the complete map ...
Hey!
I am creating a map in wich players have to conquer regions.
I need to know if TeamA and/or TeamB have units placed in those regions or not.
I created a trigger picking all units inside the specific region. Owners of units are checked. If a unit is owned by any player of TeamA a variable ("blue") is set to true, saying there is a unit of teamA inside the region. Same for TeamB, second boolean variable ("red") storing wether there is a unit of teamB inside or not.
The problem: This method ALWAYS find a unit owned by TeamA inside a region even if there is no unit of any team inside Units of TeamB are recognized correctly
Troubleshooting (only one change at a time): - i disabled the check for units of player 1 -> WORKED - i deleted every unit/doodad/etc inside the region -> broken - i changed the location of the region ->broken
Looks like the problem is, that my triggers always find a unit owned by player 1 inside a region. I have no idea why.
I would be happy about any advice! Thanks!