Code:
function bullet_event()
{
switch(event_type)
{
case event_block:
vec_to_angle (my.pan, bounce);
ent_create("bulhole.tga",my.x,bullet_hole);
wait(1);
ent_remove(me);
case EVENT_ENTITY:
if(you.gegner == on)
{
you.health -= 10;
snd_play(laugh,50,0);
ent_create("bullet.mdl",you.x,blut_action);
wait(1);
ent_remove(me);
}
if (my != 0)
}
}
action bullet_move ()
{
turn_towards_target();
my.flags |= (ENABLE_BLOCK | ENABLE_ENTITY | ENABLE_IMPACT);
my.event = bullet_event;
my.bright = on;
my.flare = on;
my.flag1 = off;
// my.invisible = on;
while (my.skill16 <;10000&&my.flag1 == off)
{
move_mode = IGNORE_YOU + IGNORE_PASSABLE + IGNORE_PUSH + IGNORE_PASSENTS;
my.skill16+= ent_move(vector(99*time_step,0,0),nullvector);
effect(schweif,1,my.x,nullvector);
wait(1);
}
wait(1);
ent_remove(me);
}