ok i am so very close to the effect i`m after for my game, but i have tried so many different things and all i have managed is to give myself a headache, although that may have been caused by banging my head off mm desk lol, i am going to post all the test code in the hopes that someone can tell me, how to scale a model on it`s x axis to an enemy model and not pass through it. i know this is a lot of code to ask you guys to look through, but believe me when i say i have tried my best but just can`t figure it out. thanks for any help.
Code:

var video_mode = 8;
var video_depth = 32;
var video_screen = 1;

sound beam_wav = <beam.wav>;

string stars_mdl = "stars.mdl";
string galor_mdl = "galor.mdl";
string excelsior_mdl = "excelsior.mdl";
string fphaser_mdl = "fphaser.mdl";

var distance_to;
var enemy_handle; // a global handle we can use for transferring pointers
var target_entity;
var scan_indicator;
var target_on;
var in_p;
var freeze_switch;
var camera_move_to[3];
var camera_distance = 200;
var camera_pan;
var camera_tilt;

entity* enemy;

define _target = 1;
define phaser skill12;
define ammo skill21;

string lockon = "lockon+3.tga";
string cphaser_mdl = "cphaser.mdl";

bmap hempire_tga = "hempire.tga";
bmap charge_pan_tga = "charge_pan.tga";
bmap charge_tga = "charge.tga";
bmap effect_tga = "effect.tga";

function stars();
function c_ship();
function f_ship();
function event_scn();
function got_target();
function c_phaser();
function got_shot();

panel Phaser_pan
{
bmap = charge_pan_tga;
pos_x = 945;
pos_y = 567;
window = 3, 2, 74, 7, charge_tga, player.phaser, 0; // can range from 0 to 74
flags = refresh, visible;
}

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;
}
}

function c_phaser
{
///this needs to scale a model from the players vertex to the targeting sprite
///and run the got shot function
}

on_mouse_left = c_phaser;

function main
{
///init_radar();
mouse_map = hempire_tga;
mouse_mode = 1;
level_load ("new_beginings.wmb");
wait(1);
ent_create (stars_mdl, nullvector, stars);
ent_create (galor_mdl, vector(0, 0, 0), c_ship);
ent_create (excelsior_mdl, vector(300,0,0), f_ship);
// ent_create (excelsior_mdl, vector(200,40,0), f_ship);
//ent_create (excelsior_mdl, vector(-200, 40, 0), f_ship);
//ent_create (clouds_mdl, vector(1500, 10000, 0), clouds);
//ent_create (jungle_mdl, vector(25000, 10000, 0), planets);
//ent_create (clouds_mdl, vector(25000, 10000, 0), clouds);
while (1)
{
mouse_pos.x = pointer.x;
mouse_pos.y = pointer.y;
wait (5);
}
}

function target_detect()
{
enemy = my;
distance_to += 1;
if(event_type == event_detect && scan_indicator == _target && target_on == 0 && vec_dist(my.x,your.x) < distance_to)
{
target_on = 1;
enemy_handle = handle(you);
target_entity = handle(you);
ent_create(lockon, your.x, got_target);
}
}

function scan_targets()
{
while(1)
{
wait(-0.25);
if(target_entity != 0) { continue; }
scan_indicator = _target;
distance_to = c_scan(player.x, player.pan, vector(360, 60, 1000),ignore_me+ignore_you+scan_limit);
}
}

function c_ship()
{
in_p = 0;
freeze_switch = 0;
player = me;
my.ammo = 50;
my.scale_x = 1.0;
my.scale_y = my.scale_x;
my.scale_z = my.scale_x;
///my.transparent = on;
you = null;
my.enable_detect = on;
my.event = target_detect;
var ship_speed;
scan_targets();
while (1)
{
if (key_w == on)
{
if (ship_speed.x < 1)
{
ship_speed.x += 10.0 * time;
}
}
else
{
if (ship_speed.x >= 0)
{
ship_speed.x -= 0.05 * time;
}
}
if (ship_speed.x < 0) {ship_speed.x = 0;}
if (key_a == on)
{
my.pan += 3 * time;
}
if (key_d == on)
{
my.pan -= 3 * time;
}
if (ship_speed.z < 0) {ship_speed.z = 0;}
if (key_q == on)
{
my.tilt + = 3 * time;
}
if (ship_speed.z < 0) {ship_speed.z = 0;}
if (key_e == on)
{
my.tilt - = 3 * time;
}
ent_move (ship_speed.x, nullvector);
if
(key_p)
{
if (in_p == 0)
{
in_p = 1;
freeze_switch = 1 - freeze_switch;
}
}
else
{
in_p = 0;
}
if (freeze_switch == 0)
{
camera.pan -= mouse_force.x * 12 * time;
camera.tilt += mouse_force.y * 8 * time;
camera.tilt = clamp(camera.tilt,-30,10);
temp = fcos(camera.tilt,-camera_distance);
vec_set(camera.x,vector(my.x + fcos(camera.pan,temp),my.y + fsin(camera.pan,temp),my.z + 20 + fsin(camera.tilt,-camera_distance)));

vec_diff(temp.x,camera.x,my.x); //find the vector from the player to the camera
vec_normalize(temp.x,16); //get the magnitude of it's vector to 16 quants and store it in temp
vec_add(temp.x,camera.x); //add the vector (from player to camera) of a magnitude of 16 quants and add it to the camera's position.

trace_mode = ignore_me+ignore_passable+ignore_models;
result = trace(my.x,temp.x); //trace from the player to 16 quants behind the camera.
IF (result > 0) {
vec_diff(temp.x,my.x,target.x); //find the vector from the point the trace hit to the player
vec_normalize(temp.x,16); //get the magnitude of this vector to 16 quants and store in temp
vec_set(camera.x,target.x); //place the camera at the trace hit point
vec_add(camera.x,temp.x); //move the camera away from the wall by the vector temp, 16 quants towards the player
}

}
wait(1);

}
}



function f_ship
{
enemy = my;
my.scale_x = 2.0;
my.scale_y = my.scale_x;
my.scale_z = my.scale_x;
my.enable_scan = on;
my.event = event_scn;

}

function event_scn()
{
wait(1);
}

function got_target
{
my.scale_x = 0.1;
my.scale_y = my.scale_x;
my.oriented = on;
my.facing = off;
you = ptr_for_handle(enemy_handle); // now YOU is the enemy

while(you != null)
{
vec_set(temp,player.x);
vec_sub(temp,my.x);
vec_to_angle(my.pan,temp); // turn the target toward the player
vec_set(temp,nullvector);
temp.x = 20; // change this if you need to - the distance in front of the enemy
vec_rotate(temp,my.pan);
vec_add(temp,your.x);
vec_set(my.x,temp);
wait(1);
}
target_entity = 0;
target_on = 0;
ent_remove(me);
}

function got_shot()
{
if (event_type == event_block
|| event_type == event_entity
|| event_type == event_impact) {
my._hull -= 10;
}
}




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