// Entity is up moving and move into a random pan value when hits wall/entity ... no gravity ... gun is included ... press 0 ...

function ent_up_moving_ev()
{
if(event_type == event_block)||(event_type == event_entity){my.pan = random(360);} //rotate when hits wall or entity
if(event_type == event_shoot){my.skill5 -=1;} // if he is shooted at decrease health (my.skill5)
}

action ent_up_moving()
{
my.skill5 = 30;// health
my.enable_block = on; my.enable_entity = on; my.enable_shoot = on; my.event= ent_up_moving_ev;
my.skill1 = 0;// restet animation cycle
while(my.skill5 > 0){my.skill1 +=0.3; ent_cycle("walk", my.skill1); my.skill2 =0.3; move_mode = ignore_passable + use_box; ent_move(my.skill2,nullvector); wait(1);}
my.skill1 = 0;// restet animation cycle
while(my.skill1 < 100){my.skill1 +=0.8; ent_frame("death", my.skill1); wait(1);}
my.passable = on; my.transparent = on;my.alpha = 100;
while(my.alpha > 0){my.alpha - = 0.3; my.skill1 +=0.8; wait(1);}
ent_remove(me); // remove when died
}

// No more ideas frown ++ ........ SEE YA ???

SOUND shoot001 = "shot4.wav"; // "yoursound.wav" finns i template folder (> the sound < , must be in the same folder as script)

function gun_muzzle() // add to main function triggers the script)
{
my.passable = on; my.transparent = on; wait(30); ent_remove(me);
}

function guns() //add to main function > guns(); < shoots , from camera center ... press 0 to activate camera move...
{
while(1)
{
if(mouse_left == 1)||(key_ctrl == 1) // if mouse left or ctrl is pushed
{
vec_set(temp,camera.x);temp.x = 30000; vec_rotate(temp,camera.pan); trace(camera.x,temp);trace_mode = ignore_passable + activate_shoot;ent_create("particle.pcx",target,gun_muzzle);snd_play(shoot001,100,0);wait(30);
}
wait(1);
}
}

// Hope it works ...

// I use WDL (saves as wdl-file) , that is what i have teached , myself , somewhat , before

// B

//