Basically what you have to do is remove the origins you used for the beams and use brushes instead to replace the beams.
Select a group of brushes you want to be the same color and convert them into scrip_objects (right click > script > object) and give them a targetname like redbeams, bluebeams, etc
all those scrip_objects have to use the same shader with the "rgbGen fromEntity" statement (feel free to copy mine and rename it to whatever you want)
Code:
textures/zappa/test_tunnel_white
{
qer_editorimage textures/common/white.tga
surfaceparm nolightmap
{
map textures/common/white.tga
blendFunc add
rgbGen fromEntity
}
}
Then in the map script, after "level waittill spawn" you just add something like this to make them notsolid and give them the color you want. (no need to run a loop or exec another script)
$redbeams notsolid
$redbeams light 1 0 0 10
$bluebeams notsolid
$bluebeams light 0 0 1 10