Well first of all thx guys for explaining never condition.
Now then for my second question. Is it possible to detect if a building is being powered by a pylon with triggers? I checked the tutorial database and it wasn't there so I'm pretty sure its not possible (yet) but ya...
I know you can do pylonless building but thats not what I want.
The trivially easy and silly way would be to make a location that's roughly the size of a pylon aura, and center it on the building. If the player doesn't have a pylon in that location, it's definitely not powered. Now if they DO have a pylon in that location, it's most likely powered, but not necessarily.
I'm sure there's a way you could do this with EUD conditions, but then all the regular EUD caveats apply (preplaced units only, etc).
EDIT:
Another way, similar to the first, would be to create several rectangular locations that have the same center and, when overlaid on top of each other, create the buildable area around a pylon. Then you center ALL these locations on the building. If there is a pylon in any of them, then the building is powered.
Well, I thought about both of those ideas but was just making sure you weren't able to. EUD's really are too annoying to work with for me and probably wouldnt work anyway. I guess I'll just have to do the locations.
EDIT: Lol, heimdal, good idea but strangely thats exactly what I had in mind at first anyway. There are 3 locations to be exact without getting extremely picky about it.