| 09-15-2003, 10:06 PM | #1 |
I have a simple trigger to move units from one waypoint to another that works perfectly for one side but does absolutely nothing for the other sides. I'm guessing that I have some kind of stupid mistake that I'm blind to and someone needs to point it out. Someone please help! Here is trig that works: Event: Unit - A unit enters HumanSpawnLeft 1 <gen> Condition: (Color of (Owner of (Triggering unit))) Equal to Red Action: Unit Group - Pick every unit in (Units within 512.00 of (Center of HumanSpawnLeft 1 <gen>) matching ((Color of (Owner of (Picked unit))) Equal to Red)) and do (Unit - Order (Picked unit) to Attack-Move To (Center of HumanSpawnLeft 2 <gen>)) This one doesn't work: Event: Unit - A unit enters OrcSpawnLeft 1 <gen> Condition: (Color of (Owner of (Triggering unit))) Equal to Yellow Action: Unit Group - Pick every unit in (Units within 1000.00 of (Center of OrcSpawnLeft 1 <gen>) matching ((Color of (Owner of (Picked unit))) Equal to Yellow)) and do (Unit - Order (Picked unit) to Attack-Move To (Center of OrcSpawnLeft 2 <gen>)) I've checked that my regions are correct and the orcs are definetly yellow. I have no clue why this **** isn't working. |
| 09-15-2003, 10:10 PM | #2 |
Hrm...They both look pretty identical, except for that selection size, don't they? My guess is that, despite how they appear on the map, once you get in game perhaps the orcs aren't yellow. In any case, I don't think you should be using colors as a general determination in your map. Try specifying the player number instead. That is more constant from game to game. |
| 09-15-2003, 10:52 PM | #3 |
I Agree with Bad use this condition instead of your current one, does the same thing but checks that player 1 (red) is the owner of the unit. Trigger Event Condition (Owner of (Triggering unit)) Equal to Player 1 (Red) Action Good Luck With It |
| 09-16-2003, 12:14 AM | #4 |
That worked. I never woulda guessed that was the problem. Why would it not work? The owner should definetly be yellow cause the AI player is set to yellow slot and the slots are locked. |
| 09-16-2003, 12:34 AM | #5 |
Guest | Try changing triggering player to Owner of (Entering Unit) |
| 09-16-2003, 12:38 AM | #6 |
Some units don't take the team color so checking color won't always work. |
| 09-16-2003, 12:52 AM | #7 |
Damn I can't figure out what condition I want so that it only selects a certain color. matching ((Color of (Owner of (Picked unit))) Equal to Red)) The above condition doesn't work. It appears that Units in Range will not let you select which player the units in range belong to as a condition. I might just have to use Units in Region Owned by Player. |
| 09-16-2003, 01:36 AM | #8 |
Um, you have the check boxes in the forces tab selected also, right? |
| 09-16-2003, 01:53 AM | #9 |
Crap the spawns are all working in that they move and such but now it seems randomly units get wrong orders and head off on odd tangents. All I have is a sequence of triggers that look like this: Event: Unit - A unit enters HumanSpawnLeft 1 <gen> Condition: (Owner of (Triggering unit)) Equal to Player 1 (Red) Action: Unit Group - Pick every unit in (Units in HumanSpawnLeft 1 <gen> owned by Player 1 (Red)) and do (Unit - Order (Picked unit) to Attack-Move To (Center of HumanSpawnLeft 2 <gen>)) The only difference between them is that the region name increments so that they move from one to the other. For example the next trigger in this sequence would be this: Event: Unit - A unit enters HumanSpawnLeft 2 <gen> Condition: (Owner of (Triggering unit)) Equal to Player 1 (Red) Action: Unit Group - Pick every unit in (Units in HumanSpawnLeft 2 <gen> owned by Player 1 (Red)) and do (Unit - Order (Picked unit) to Attack-Move To (Center of HumanSpawnLeft 3 <gen>)) There seems to be no margin of error in this setup but they randomly go off in screwy direction or start running backwards to the flow. Any ideas? EDIT: I have further narrowed the problem. For some reason when one unit enters one of these regions by itself it will be sent back the way it came. Likewise the last unit in a group of units will be sent back. I'm not really sure why it's doing this. Shouldn't the unit that activates the trig be included in the group selected by the trig? |
