| 03-23-2005, 02:23 AM | #1 |
I can't find a basic condition or event that if player whatever has no certain units at a region. Is there one that i can't see or is there not one and how can i do this. |
| 03-23-2005, 04:40 AM | #2 |
Guest | Do you guys even look first? (Number of units in (Units in (Playable map area) owned by Player 1 (Red))) Equal to 0 change (Playable map area) to your own rect. |
| 03-23-2005, 05:02 AM | #3 | |
Quote:
He said a certain unit, not just any unit. Heres what your looking for. Code:
Interger Comparison- (Unit-type of (Random unit from (Units in (Your Region) owned by Player * (***)))) Equal to The Unit |
| 03-23-2005, 10:04 AM | #4 | |
Quote:
Secondly, you are just looking at a random unit in the region and checking if it's of the type you want. It may not be, but that doesn't mean that some other unit in the region isn't. Here's a working code that will only do stuff if a player doesn't have a unit of a certain unit-type in a region: Code:
set TempUnitGroupVariable = (units owned by player [i](your player)[/i] matching condition: and - (unit type comparison - unit type of (matching unit) equal to[i](your unit type)[/i]) and (boolean comparison - ((matching unit) is in region [i](your region)[/i]) equal to true)
If - Then - Else multiple functions
If - conditions:
integer comparison - number of units in TempUnitGroupVariable equal to 0
Then - actions:
[i]the player has no units of the chosen type in that region, do your actions here[/i]
Else - actions:
do nothing
custom script: call DestroyGroup( udg_TempUnitGroupVariable ) |
| 03-23-2005, 06:07 PM | #5 | |
Quote:
... I typed it out wrong, I didn't mean to add the interger part, it was late when I typed it, and I was sleepy. :\ And your right, I wasn't paying attention again. Sleepy. :\ |
