I was thinking that if i put only:
commands the least
commands the most
it would simply compare who has the most in middle and thus if p1 has 1 unit and p2 has 3 ONLY p2 would have vision but what happens is that at the beginning of the game both players get vision and it simply wont shut off...
If you put only these conditions the problem is that at the beginning of the game
all players remaining in the game (includeing observers) have got equal number of units in the middle. Every time all players remaining in the game have got equal number of units at location they all have the most and
at the same time the least units at that location. This is the only case when both conditions are true. This could be the problem.
You better imagine when you have to
to give vision and
to take it instead of thinking
when the vision should be on. Thinking the first way is closer to the triggers implementation.
[quote]it dont takeing player allainces into account
I dont understand what you mean... that if p1 and p2 are ally and one of them goes to middle the other one doesnt get vision?? I think they do because they share vision... please explain.
Oh well, I was thinking of 4 players playing the game and have alliances between each other. The question is what you should do in that case.
Your current system is not taking alliances into account. Everything will work the same way whether they are allied or not. With your current system (and mine too) this does not matter at all.
I have a question, you think is better to use EACH PLAYER their own triggers or for sake of less triggers is it better to use the "Current Player" option.
It is better to use the Current Player option. Generally it is bad when you have many triggers makeing the same thing, because if you want to change something you have to change it in every copy of the trigger.
But I break this rule and gave you an example for the sake of being more simple to understand... To use the current player in my example you should use
Death Counters (switches section) instead of the Switches sP1VisionOn and sP2VisionOn:
// give vision
TRIGGER
OWNERS: Force 1
CONDITIONS:
Current player has suffered exactly 0 deaths of dcVisionOn
Current player commands the most Any Unit at lMiddle
Current Player brings at least 1 Buildings at lMiddle
ACTIONS:
Modify deaths counts for Current Player: set to 1 for dcVisionOn
Execute AI script +Vi7
Preserve trigger
// take vision
TRIGGER
OWNERS: Force 1
CONDITIONS:
Current player has suffered exactly 1 deaths of dcVisionOn
Current player commands the least Any Unit at lMiddle
ACTIONS:
Set sTakeVision
Preserve trigger
TRIGGER
OWNERS: Force 1
CONDITIONS:
Current player has suffered exactly 1 deaths of dcVisionOn
Current Player brings exactly 0 Buildings at lMiddle
ACTIONS:
Set sTakeVision
Preserve trigger
TRIGGER
OWNERS: Player 1
CONDITIONS:
Switch sTakeVision is Set
ACTIONS:
Clear sTakeVision
Modify deaths counts for Current Player: set to 0 for dcVisionOn
Execute AI script -Vi7
Preserve trigger
You change every
"Set sP1VisionOn" and "Set sP2VisionOn" actions to "Modify deaths counts for Current Player: set to 1 for dcVisionOn"
"Clear sP1VisionOn" and "Clear sP2VisionOn" actions to "Modify deaths counts for Current Player: set to 0 for dcVisionOn"
"sP1VisionOn is Set" and "sP2VisionOn is Set" conditions to "Current player has suffered exactly 1 deaths of dcVisionOn"
"sP1VisionOn is Cleared" and "sP2VisionOn is Cleared" conditions to "Current player has suffered exactly 0 deaths of dcVisionOn"
dcVisionOn is an unused unit which players cant kill in the game. For example a hero unit or whatever.
After this you could generalize triggers for Force 1.
-- Im thinking about adding other places in the map where you can control vision (corners) so people have to be going around the map (kind of training... specially for me
) but I am not sure if I can give 100% vision of map to player 8 and then just share vision to players in some specific locations depending on switches or something so thats just a vague idea I have, not working on it right now because im trying to improve the system --
What you want
could be done. But you cant give vision to players in some specific locations. For this purpose you'll need 3 computer players: the one has vision only for Player 1, the other has vision only for Player 2 and the last has vision to both players. You give Neutral units at certain areas depending on the presence of players' forces in the area. That is more complicated. You should first clearly decide what do you want to see with one area.
What i have right now is the comparison, right now if both players have units in the middle both are getting vision regardless of who has more units... I want to fix that.
Right now you have not clearly this. The player will
get vision only when he has got
the most units. But once he got the vision he will
loose it only when he totally leave the area.