Ok so I made a trigger for my map to turn the first city built into a capital. A very simple and straightforward trigger, player builds a city, trigger counts the number of cities built by player, if the number is less than 1, the city is given the behavior capital city.
It might be easier to use variables - once a player builds a city/capital, it sets their array var to true.
For counting the cities, I suggest you make a Condition out of it. Have it pick every unit in the map, if the unit owned by player A is of type 1, add one to the counter. Then return the counter's value.
The player parameter is the one that's out of bounds. Triggering player is not valid within the context of that event, and is returning -1. Instead, use Owner of Triggering Progress Unit.
Also be careful with the comparison. City count can be 1 if you check when construction progress is completed (the one you already did).
And, if you check for City, and not for Capital City, you will never have a City, as all the new City will check, see no other City, and became a Capital City itself.
Try using Owner of (triggering Unit) rather then triggering player.
Also you need to increment that city counter you have there.
Ok, it's things like this that make me mad, see the thing is, thats how I originally had the condition, it was set as Owner of Triggering Unit in the first place.
IT SAYS IT RIGHT IN THE EVENT, that i'm aloud to use triggering player, so I decided to make the conditions smaller looking. So what the fuck blizzard, I try to make the triggers nice and small yet you prove I need to add the extra step?
As for the city count I was gonna adjust that later if I needed, I was just trying to get the damn error message to go away.
Just when you think you can trust something. I should have figured the easy route was causing the problem from the start.
So yes, as it is now the trigger is working fine. If blizzard didn't lie to me in the very small amount of tooltips they have on their editor, I wouldn't have had to waste your time, sorry about that.
Ok so I made a trigger for my map to turn the first city built into a capital. A very simple and straightforward trigger, player builds a city, trigger counts the number of cities built by player, if the number is less than 1, the city is given the behavior capital city.
So heres the trigger:
One would assume this should be all I need, yet everytime the trigger fires I'm given a parameter out of bounds error
It might be easier to use variables - once a player builds a city/capital, it sets their array var to true.
For counting the cities, I suggest you make a Condition out of it. Have it pick every unit in the map, if the unit owned by player A is of type 1, add one to the counter. Then return the counter's value.
The player parameter is the one that's out of bounds. Triggering player is not valid within the context of that event, and is returning -1. Instead, use Owner of Triggering Progress Unit.
@Zackreaver: Go
Also be careful with the comparison. City count can be 1 if you check when construction progress is completed (the one you already did).
And, if you check for City, and not for Capital City, you will never have a City, as all the new City will check, see no other City, and became a Capital City itself.
I think Riley is correct with this one. Use Owner of Triggering Progress Unit instead of Trigging Player.
Try using Owner of (triggering Unit) rather then triggering player.
Also you need to increment that city counter you have there.
Ok, it's things like this that make me mad, see the thing is, thats how I originally had the condition, it was set as Owner of Triggering Unit in the first place.
What pisses me off the most is this little tidbit
http://yfrog.com/n2reallymakesmemadj
IT SAYS IT RIGHT IN THE EVENT, that i'm aloud to use triggering player, so I decided to make the conditions smaller looking. So what the fuck blizzard, I try to make the triggers nice and small yet you prove I need to add the extra step?
As for the city count I was gonna adjust that later if I needed, I was just trying to get the damn error message to go away.
Just when you think you can trust something. I should have figured the easy route was causing the problem from the start.
So yes, as it is now the trigger is working fine. If blizzard didn't lie to me in the very small amount of tooltips they have on their editor, I wouldn't have had to waste your time, sorry about that.