sample:
Code:
var id[n]; // n is you buildings array 
var i;
...

action building()
{
 ...
 id[i]=1;
 my.skill50 = i; 
 i+=1;
 ...
 while(1)
 {
  ...
  wait(1);
 }
 id[skill50]= 0;
 ent_remove(me);
}
...

add action to building.
If you want to check building, example church has id[5], then you check if id[5]==1, if it's true, then exist, else, no.

if you can't understand what is the array, then try use some variables:
Code:
var church;
...
action church()
{
 church = 1;
 while(1)
 {
  ...
  wait(1);
 }
 church = 0;
 ent_remove(me);
}
....

then you just check if church == 1 wink


The smaller the bug, the harder it is to kill.
_________________________________________
Forklift DEMO (3dgs)