| 03-29-2007, 07:06 PM | #1 |
Am I missing somthing, or is there no way to detect what peon finished constructing a building. I originally tried using GetTriggerUnit() but after much testing, i found out that GetTriggerUnit() refers to the unit being built, not the builder. |
| 03-29-2007, 07:12 PM | #2 |
Under the Unit - Generic Unit there is an option for Finishes Construction of Building After this it should be simple to add a condition for the building, and find the unit. Here's what I did (GUI): Trigger: Build
|
| 03-30-2007, 01:46 AM | #3 |
When the peon begins construction, attach it to the unit being built via Local Handle Variables or Structs (though I don't know how to use structs). Then, when the unit is finished, just get the attached unit as the builder. Of course, this would bug out if you started construction with one peon, then told it to stop, and finished construction with a new one. |
| 03-30-2007, 02:13 AM | #4 |
What your saying works out in theory, but I don't see how it could possibly work. Since im ordering my peon to build a building, the building does not exist while running the intial trigger. Trust me, I've though long and hard about this problem. Thanks for your imput though. |
| 03-30-2007, 04:47 AM | #5 |
If you could be a little more specific about what you are trying to do with your trigger, I could help you a lot more. The way to go about this kinda depends on what you're trying to get this to do. |
| 03-30-2007, 05:06 AM | #6 |
Basically, Im creating an AI using jass, (cuase you can't run ai scripts with neutral players, plus I tried learning the AI stuff, and it was a pain in the butt, but anyways...) So basically, I had it set up where there was a list of buildings that needed to be built, and I wanted it so every time a peon was done building a building, to basically order him to start the next building. |
| 03-30-2007, 06:24 AM | #7 |
You might try the event "a unit starts constructing," and use "triggering unit" for the builder and "constructing structure" for the target. Not tested, but that's my thought on the perliminary dig through the trigger editor. (dunno what these are in Jass, but you can just convert, I guess) |
| 03-30-2007, 06:51 AM | #8 | |
And, to quote myself earlier: Quote:
Blizzard is so lame for not making this a function. |
| 03-30-2007, 10:39 AM | #9 | |
Quote:
|
