Okay, so I'm looking for an easier to do this, to reduce the trigger executions that occur. Because of the limitations in the trigger editor we can only change the color of 1 unit at a time, rather than groups of units; which doesn't make sense to me. So I set up a loop to change the color of a random unit in a unit group. I'd rather not have it loop the some 50+ times I might need to all but insure that all of the units will be changed. Because I just started this section of my map I'm only changing the color of 7 units at this very moment, but a loop of 20 misses a couple even in such a small group. Eventually I'll have larger groups as well as multiple groups so I'd to stream line this as much as possible.
In the looping trigger I have an if/then set up checking for an integer. The Color Change action is as follows
[?] Set Unit Color
- [X=] Unit: Random Unit From Unit Group
[X=] Type: Any
- [X=] Source Unit Group: Units In Region Matching Condition
[X=] Unit Type: Any
[X=] Region: Color to White 01
[X=] Player: 3
[X=] Unit Filter: Excluded: Missile, Dead, Hidden
[X=] Count: Any Amount
[X=] Index: (Player 00) White
I think you're missing something here... or I didn't understand what you wanted. It's very easy to do something to every unit in a unit group or region or whatever. Modify this to suit your needs.
There's the work around I was looking for, thanks a ton. That should help me out with other triggers as well down the road.
That still does a single unit at a time, since it has to pick them, which bugs me for some reason that the editor only handles a single unit for some tasks that shouldn't care about numbers of units.
Yeah, it's odd. I can't see the pattern why some things do work for multiples but not all... but you gotta do what you gotta do (damn, too much Mafia 2).
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Okay, so I'm looking for an easier to do this, to reduce the trigger executions that occur. Because of the limitations in the trigger editor we can only change the color of 1 unit at a time, rather than groups of units; which doesn't make sense to me. So I set up a loop to change the color of a random unit in a unit group. I'd rather not have it loop the some 50+ times I might need to all but insure that all of the units will be changed. Because I just started this section of my map I'm only changing the color of 7 units at this very moment, but a loop of 20 misses a couple even in such a small group. Eventually I'll have larger groups as well as multiple groups so I'd to stream line this as much as possible.
In the looping trigger I have an if/then set up checking for an integer. The Color Change action is as follows
[?] Set Unit Color
- [X=] Unit: Random Unit From Unit Group
[X=] Type: Any
- [X=] Source Unit Group: Units In Region Matching Condition
[X=] Unit Type: Any
[X=] Region: Color to White 01
[X=] Player: 3
[X=] Unit Filter: Excluded: Missile, Dead, Hidden
[X=] Count: Any Amount
[X=] Index: (Player 00) White
I think you're missing something here... or I didn't understand what you wanted. It's very easy to do something to every unit in a unit group or region or whatever. Modify this to suit your needs.
There's the work around I was looking for, thanks a ton. That should help me out with other triggers as well down the road.
That still does a single unit at a time, since it has to pick them, which bugs me for some reason that the editor only handles a single unit for some tasks that shouldn't care about numbers of units.
Yeah, it's odd. I can't see the pattern why some things do work for multiples but not all... but you gotta do what you gotta do (damn, too much Mafia 2).