var temp2[6];
ACTION attach_weapon {
my.passable = on;
proc_late();
WHILE (you != null) {
vec_for_vertex(temp.x,you,125); //hand palm base
vec_for_vertex(temp2.x,you,130); //hand palm tip
vec_set(my.x,temp.x);
vec_diff(temp.x,temp2.x,temp.x);
vec_to_angle(temp.pan,temp.x);
vec_set(my.pan,temp.pan);
wait(1);
}
}
action player_()
{
player = my; // I'm player
my.invisible = off; // player is invisible or not
my.narrow = on;
my.hp = 100; // sets health to 100 at the beggining
while(my.hp > 0) // while I'm alive
{
ent_create("sword.mdl",my.x,attach_weapon);
wait(1);