function gethit()
{
if(your->parent != me)
{
your.health = 0;
}
}
action playeraction()
{
my.emask = ENABLE_ENTITY;
my.event = gethit;
...
while(1)
{
c_move(me, NULL, vector(my.velx * time_step, my.vely * time_step, my.velz * time_step), GLIDE | IGNORE_YOU);
c_rotate(me, vector(my.campan - my.pan, 0, 0), GLIDE | IGNORE_YOU);
}
}
action shotaction()
{
my.push = 3;
...
while(1)
{
c_move(me, vector((90 - my.shotpower * 30) * time_step, 0, 0), NULL, IGNORE_PUSH);
}
}