well here is what i currently have, the bea mworks but will not follow the enemy or the target sprite, and it passes through the enemy but still causes damage, the problem with this is any enemy near enough to the shot one will also get hit, and shields will be useless. all the code is the same as i have posted bar this. this is all the beam weapon code


var phaser_decreasing = 0;
function init_player_startup()
{
while (player == null)
{
wait (1);
}
player.phaser = 74;
while (1)
{
if(phaser_decreasing == off)
{
player.phaser += 0.4 * time_step; // increase power slowly
player.phaser = min(74, player.phaser); // limit phaser power 74
}
wait (1);
}
}

function beam_weapons
{
while ((mouse_left == 1))
{
if(player.phaser <= 0) { break; }
phaser_decreasing = on;
player.phaser -= 3*time_step;
snd_play (beam_wav, 50, 0);
vec_for_vertex(temp,player,3894);
ent_create (fphaser_mdl, temp, c_phaser);
wait(1);
}
phaser_decreasing = off;
}

var phaser_speed;

function c_phaser
{
wait(1);
c_setminmax(me);
my.scale_x = enemy;
my.scale_y = 0.2;
my.scale_z = 0.2;
my.passable = off;
my.oriented = on;
my.flare = on;
my.bright = on;
my.ambient = 100;
my.pan = player.pan;//--->player.pan and tilt set to camera
my.tilt = player.tilt;
my.enable_entity = on;
my.enable_block = on;
my.enable_impact = on;
my.polygon = on;
phaser_speed.x = 50 * time;
phaser_speed.y = 0;
phaser_speed.z = 0;
while (my != null)
{if
(my.roll > 150){my.passable = off;}
my.roll += 25 * time;
c_move(my,vector(phaser_speed*time,0,0),nullvector,ignore_you);///
my._frameCt += 1;
if (my._frameCt >= 20) { break; }
wait(1);
}
if (me != null)
{ ent_remove(me);
}
}




Why does everyone like dolphins? Never trust a species which smiles all the time!