The easiest way would be something as follows:
#define _type skill100
#define type_misc 0
#define type_enemy 1
#define type_spawn 2
action act_spawn()
{
my._type = type_spawn;
}
...
for(you = NULL; you = ent_next(you); you)
{
if(your._type == type_spawn) ...
}
Alternatively, you can use the str_for_ent commands or how they are called to compare the file, and/ or run this loop once on level initialization and store them in an array/ a list.