The thing I cant figure out how to do is kill units when they have specific properties. In my case, 0 energy, or 0 units in the hanger (reaver). I have a time limit that is set so they die after 10 seconds, and they dont interfere with the game too much, but it would be nice for them to die once they have served thier purpose (using thier spell/shooting a scarab). Is there a way to do this?
Im pretty sure only with eud conditions...
Uber@tion 2 can easily create eud conditions, but im not sure its updated to the newest patch.
EUD conditions would not fit well to this specific purpose, because it requires LocalIDs, which doesn't happen very well with mass units or units created after the game starts.
So basically, no, there is no direct way to do it, unless you hassle with EUDs which I would recommend against. It may be possible to find other ways around it to try to make up a form of detection by detecting other things, but this of course wouldn't be perfect.
0 units in hangar is easy. Use 'move location' to center a location on your reaver/carrier. Then use a 'bring' trigger to detect if scarabs/intercepters are in the location. "current player brings exactly 0 protoss scarab to 'loaction'" would work for reavers. The 'bring' trigger for some reason CAN detect units while they're in the hangar. As for the energy, you would have to use an EUD from uberation2 to detect unit energy.
Edit: I guess i should have made this clear... IF uberation has that EUD, it's the only way to detect unit energy. If not, then it isnt possible.
In this situation, it is impossible to know what a unit's slot number will be, and without it, it is impossible to detect its energy/hanger count.
Also, assuming you somehow magically find out that a certain unit has 0 energy or 0 scarabs, what then? There is nothing you can do to that unit.
Refrain from suggesting EUDs ifyou don't even know what they are capable of doing.
Nquiksilver, you will not be able to remove a specific unit after it has cast a spell.
Seriously, you dont need to detect hangar count. I tested the method before i posted it. And as for EUDs, i wasn't suggesting to use one, only stating that would be the only possibility IF uberation has it.
Hey, i was just saying the possibilities... maybe he will only have one reaver, and will know its number.. there ARE some possibilities of where this would work..
Personally i never use EUDs... but as i just said it is a POSSIBILITY in this situation. Isnt that the point of sen? if everyone knew what the answer was to the problem, sen would just be a page of FAQs.. leave some room for creativeness and the possibility arises for even more resourceful solutions.. without this euds wouldnt even be around...
Ok, thanks. I just set a new trigger to set the players gas amount to 10, then decrease it by one after a wait of 1000 milliseconds. When the players gas count is zero, the unit is destroyed.