A little contribution how to make a laser (light) targeting not using a model but bmap, which looks better I think and it's more easy to do
You can add a alpha schannel or etc
If you want to see it in action look at my "space war" project in "showcase I" section
LINK all of the others ships are using this code but only player doesn't... yet
And of'course You may change vecotr to vec_for_vertex for better looking
Code:
var my_target[3];
function laser_targeting
{
my.passable = on; my.oriented = on; my.facing = off;
my.flare = on; my.bright = on;
while(you)
{
proc_late();
c_setminmax(me);
vec_set(my.x, you.x);
vec_lerp(my.x,you.x,my_target.x,0.5);
vec_set(temp, you.x);
vec_sub(temp, my.x);
vec_to_angle(my.pan,temp);
my.tilt += 90;
my.scale_y = vec_dist(you.x,my_target.x) / 5; //5 is the height of the bmap
wait(1);
}
}
action gun_action
{
ent_create("your.tga",my.x,laser_targeting); //small one like 5x5
while(me)
{
vec_set(my_target, nullvector);
my_target.x = 500; //lighting range
vec_rotate(my_target, my.pan);
vec_add(my_target, my.x);
wait(1);
}
}