a1 will hold an array of all objects found within a certain range of the player.
you could access that array by using the following
{_x setdamage 1} foreach a1;
another way is to place a game logic and give it a name ie location place it where you want to use it.
a1 = nearestobjects [location,[], 100];
location is the game logic, this could also be player
[] can contain a sort of filter ie ["house"] or ["house","man"] so only those or would be effected, leaving it empty lets it gather all objects and units into the array.
100 is just a radius and can be changed as required.
so to kill all men in an area it would be
a1 = nearestobjects [location,["man"], 100];
{_x setdamage 1} foreach a1;
to make objects invisible
a1 = nearestobjects [location,[], 100];
{_x hideobject true} foreach a1;
There are of course many different commands that can be placed between the {} of the foreach command.