JaBoK, I was talking about a solution for any number of wraiths. And here's the deal...
First of all, what you must have:
1. A player with Burrowing researched. In the trigger I'll provide, this role is given to Player 8.
2. Zerg Zerglings must not be used for other purposes by Players 8, 9 and 10. Just in case.
3. An inverted location of the size of a Wraith. To create one, create any location in SCMDraft2, go to its properties menu (press enter after selecting it) and put the following values into the corresponding boxes:
Left: 36
Top: 28
Right: 1
Bottom: 1
Now, you will first need to create the wraith with the following trigger:
Trigger("Player 1"){
Conditions:
Bring("Current Player", "Terran Missile Turret", "Anywhere", At least, 1);
Actions:
Comment("");
Preserve Trigger();
Move Location("Current Player", "Terran Missile Turret", "Anywhere", "Scan");
Remove Unit At Location("Current Player", "Terran Missile Turret", All, "Scan");
Create Unit with Properties("Player 8", "Zerg Zergling", 1, "Scan", 1);
Give Units to Player("Player 8", "Player 9", "Zerg Zergling", All, "Scan");
Create Unit("Current Player", "Terran Wraith", 1, "Scan");
}
//-----------------------------------------------------------------//
Now that the Wraith is created, we can get down to the actual working of the system. As you may have noticed, we placed a burrowed, invincible (it does not say that in the text triggers) Zerg Zergling for Player 9 under the Wraith. These Zerglings will represent the points where the Wraiths are, and we will use them to scan through the Wraiths.
The scanning and all the required operations are done with a group of three triggers copied many times (as many times as many Wraiths you aexpect to have)...
Trigger("Player 1"){
Conditions:
Bring("Player 9", "Zerg Zergling", "Anywhere", At least, 1);
Actions:
Comment("");
Preserve Trigger();
Move Location("Player 9", "Zerg Zergling", "Anywhere", "Inverted");
Move Location("Player 9", "Zerg Zergling", "Anywhere", "Scan");
Give Units to Player("Player 9", "Player 10", "Zerg Zergling", All, "Scan");
}
//-----------------------------------------------------------------//
Trigger("Player 1"){
Conditions:
Bring("Player 10", "Zerg Zergling", "Anywhere", At least, 1);
Bring("Current Player", "Terran Wraith", "Scan", At least, 1);
Bring("Current Player", "Terran Wraith", "Inverted", Exactly, 0);
Actions:
Comment("");
Preserve Trigger();
Move Unit("Current Player", "Terran Wraith", All, "Scan", "Scan");
}
//-----------------------------------------------------------------//
Trigger("Player 1"){
Conditions:
Bring("Player 10", "Zerg Zergling", "Anywhere", At least, 1);
Bring("Current Player", "Terran Wraith", "Scan", Exactly, 0);
Actions:
Comment("");
Preserve Trigger();
Remove Unit At Location("Player 10", "Zerg Zergling", All, "Scan");
}
//-----------------------------------------------------------------//
The first trigger of this croup centers a 1x1 tile location called "Scan" and an inverted, Wraith-sized location called "Inverted" on each Zergling and gives the Zergling to Player 10. The second trigger fires if the Wraith has moved; it puts it back to the Zergling's position. The third trigger fires if the Wraith was killed (or removed by your triggers); it simply removes the Zergling.
After you've copied that group of triggers, say, 100 times, you must finish your system with one trigger that gives the Zerglings from Player 10 back to Player 9:
Trigger("Player 1"){
Conditions:
Bring("Player 9", "Zerg Zergling", "Anywhere", Exactly, 0);
Bring("Player 10", "Zerg Zergling", "Anywhere", At least, 1);
Actions:
Comment("");
Preserve Trigger();
Give Units to Player("Player 10", "Player 9", "Zerg Zergling", All, "Anywhere");
}
//-----------------------------------------------------------------//
If you have any questions, please ask in this thread. I hope this helps.
Post has been edited 1 time(s), last time on Jul 23 2009, 5:26 pm by JaFF.
None.