Question
Problem:
The custom buildings hasn't a proper ID to group a trigger to test his state (!alive) or make a proper destruction of them. Spawn a buiding with his placeholder using a template or model don't create a static ID, to make a destruction with a trigger (static object) is no possible with spawn buildings.
Example:
bomb= "Land_Airport_Tower_F" createVehicle position this;
Dont generate a static ID ( obviously )
Solution:
Given a public name to an object solved the problem and give us a proper solution to control the state of the spawned building:
bomb="Land_Airport_Tower_F" createVehicle (getPos IED);
nombre_bomba="bomba";
missionNamespace setVariable [nombre_bomba,bomb];
publicVariable nombre_bomba;
deletevehicle IED;
IED is a marker, object, etc. Now we can destroy the spawned building using his name (bomba)
Example:
bomba setdamage 1;