Particle System Collision Area?
so I've got a bunch of modules called "c4" labled red1,red2,red3, etc. And a laser made from particles, with angle controlled
by bckspace and enter keys:
onEnterFrame = function(){
for (m=1;m<4;m++){
c4 = this["red"+m];
if(robot_mc.laser_mc.lasereye_mc.hitTest(c4.cap)){c4.gotoAndPlay("frame2"); }
//laser controls
if(Key.isDown(Key.BACKSPACE)){robot_mc.laser_mc._visible = true; robot_mc.laser_mc.lasereye_mc._rotation -= 7;}
if(Key.isDown(Key.ENTER)){robot_mc.laser_mc._visible = true; robot_mc.laser_mc.lasereye_mc._rotation += 7;}
if(!Key.isDown(Key.BACKSPACE) && !Key.isDown(Key.ENTER)){robot_mc.laser_mc._visible = !true;}
}
for(i=0;i<500;i++) {
photons = this["photon"+i];
var k:MovieClip = robot_mc.laser_mc.lasereye_mc.attachMovie("photon","photon"+i ,robot_mc.laser_mc.lasereye_mc.getNextHighestDepth());
k._xscale = Math.random()* 120 - 20;
k._yscale = Math.random()* 180 + 35;
k._y -= Math.random()* 10 +10; //plus changes distance of start of beam, base changes range
k.gotoAndPlay(Math.ceil(Math.random()*16)); }
The problem I run into is having the collision work with the beam, as opposed to the bounding box that begins with the
lasereye_mc. Is there a way to get the c4 to react with the beam, instead of the bounding box around the beam? Or a way to get the photons to interact individually? Also, is there a way to load a particle system through an onEnterFrame without it overloading/oversaturting ? Thanks.