I want to have a trigger were instead of CurrentPlayer Brings X units to Location, i want a trigger were its sort of a ratio, or CurrentPlayer Brings more X than Y too Location, is that possible?
explain more thoroughly, like give an example of what you want current player and unit X to do
This has been my sole undoing in all of mapping. I have yet to find a decent way to compare two scores. The closest thing I can come up with is if you designate a moment to test the comparison between two scores at one time. Where you quickly delete the scores for both comparisons, and add an equal amount to two other scores. When one of them runs out, simply convert the remaining score of the other scoreboard to another score area, which will tell you how much bigger the score is than the other one. Then move the points back to the original two scores.
This method is confusing and wastes up to 5 score counters, which can be death counts, minerals or custom scores. It's the only way of doing it that I have found though. If you find a better way, please tell me.
Well its a civilization with citizens, angry citizens and happy citizens, when thers more angry citizens than ther is the other 2 the thers civil disorder, so:
i wanna kno if u can have
-----------
Currentplayer controls more unitX than unitY
where unitX could be the Angry Citizens, and unitY is the other Citizens
-----------
Civil Disorder (a switch or just createunits at location)
-----------
i dunno how to explain it any more thoroughly
ADDITION:
ok rantent... WOAH slow down lol
ADDITION:
Are u trying to say:
subtract from both scores to another set of scores and when one of the original scores gets to 0 take the other one and put that into the 5th score?
Ex:
x y a b z
2 3 0 0 0
-1 -1 +1 +1
1 2 1 1 0
-1 -1 +1 +1 0
0 1 2 2 1 (then do my trigger)
L____________________^
2 3 0 0 0
^____^_____ l_____l
i kno its a little crude but do u get wut im saying?
ADDITION:
that did not work out how i wanted it too.... it was better in my reply box
If you have only a few units possable in those locations then you might as well make a condtion for each amount to set a counter equal to it's amount of units in the location. If not read the part at the end of my post.
***Sample of a pattern***
Conditions:
-Current player brings exactly 4 unitX to feild
Actions:
-Set Deaths for 'deathX' to 4
***-----------------***
Then you would do the same thing for unit Y resulting in two scores.
And we would use the following triggers to determan the differance.
Conditions:
-Current player suffers at least 1 death for 'deathX'
-Current player suffers at least 1 death for 'deathY'
Actions:
-Subtract 1 death for 'deathX'
-Subtract 1 death for 'deathY'
-Preserve Trigger
You would wait for this trigger to run until one of the counters becomes zero.
when that happens you would have one of 3 conditions possable.
X would be 1 or larger depending on how many more of unitX there was than unitY
Y would be 1 or larger depending on how many more of unitY there was than unitX
X and Y would both 0 zero meaning there were the same amount of both units.
If in your map it is possable to have a larger amount of units in the location than you want to trigger for. You will then need to move the units away from the location one by one until you determan how many there are and set your counter.
After that putting the units back in the same place is very difficult and near impossable. You could just move them all back to the location your moved them away from but then they would all clump up in the middle.Just a comment on subtracting units until one type reaches zero (as in Rantent's post) - since you're subtracting the same amount from both types, you can save a counter by using just one for the both of them.
addition: my name is green! w00t!
thers one problem with urs Bolt, i need something like preserve trigger on the first "Sample Trigger", for example, people can capture cities, so the citizens can cahnge sides and back again, do you get my drift? i just need something simple that can detect, thers more of this unit than that unit, so this happens. if u get what i mean
Another method similar to Bolt's in that it requires triggers for each possible number of citizens would be to have triggers such as:
| Trigger |
| Conditions: |
| ¤ Player brings at most 0 'Happy citizen' to 'City' |
| ¤ Player brings at least 2 'Angry citizen' to 'City' |
| Actions: |
| ¤ {Civil Disorder at 'City'} |
| Trigger |
| Conditions: |
| ¤ Player brings at most 1 'Happy citizen' to 'City' |
| ¤ Player brings at least 3 'Angry citizen' to 'City' |
| Actions: |
| ¤ {Civil Disorder at 'City'} |
[center]and so on for each combination that will give two more angry citizens than happy ones.[/center]
The problem here is that the number of triggers required to cover all your bases becomes quite large and impractical when you introduce the third type of citizen (the 'normal' citizen) which you have to add to the 'happy' citizens, especially if you have a large total number of citizens allowed.
Another method would be to use different players or different units to 'count-off' continuously the difference in angry and happy/normal citizens:
| Trigger |
| Conditions: |
| ¤ Player brings at least 1 'Happy citizen' to 'City' |
| ¤ Player brings at least 1 'Angry citizen' to 'City' |
| Actions: |
| ¤ Give 1 'Happy citizen' from Player to Player12 |
| ¤ Give 1 'Angry citizen' from Player to Player12 |
| ¤ Preserve trigger |
[center]with another exactly the same, except with 'normal citizen' instead of 'happy citizen'.[/center]
Then the citizens that the Player really controls are either the excess happy/normal citizens, or the excess angry citizens. So if the Player has 2 angry citizens, that's when you have your 'civil disorder':
| Trigger |
| Conditions: |
| ¤ Player brings at least 2 'Angry citizen' to 'City' |
| ¤ Player brings at most 0 'Normal citizen to 'City' |
| ¤ Player brings at most 0 'Happy citizen' to 'City' |
| Actions: |
| ¤ {Civil disorder at 'City'} |
Wow i like your second idea, but thers 1 problem with it, im already using player 12 as the citizens, so people can't move there citizens around. And about the first one, the normal citizens i made just for population effects, not civil disorder, so its only the happy and angry citizens that i'm working with, i might just take out normal citizens and replace them with happy citizens. For the second one i could use player 7 as another computer, but then it just makes less people playing. One more question: could i use, say player 9, as a neutral computer player, or will that crash starcraft on b.net?
Someone can correct me if I'm wrong, but I'm pretty sure you're allowed to give units to players 9-11 without any problems, even with mac users.
I think units retain their alliance status towards units given to players 9-11 (just like they do to units given to player 12), but you might want to make the citizens invincible just in case they turn hostile anyway.
Preplaced units for players 9-11 (as opposed to units given to them) are sometimes hostile and sometimes neutral towards players 1-8, depending on which person's testing you go by; but I don't think this is such an issue since you probably won't have preplaced citizens.