action enemy_with_pointer()
{
enemy = my;
c_updatehull(my, 1);
}
-------------------------------------
action guard_with_pointer()
{
guard1 = my;
c_updatehull(my, 1);
while (1)
{
while (key_t == OFF) {wait (1);}
while (key_t == ON) {wait (1);}
c_trace (guard1.x, enemy.x, IGNORE_ME + USE_BOX); // trace to the enemy
if (you == enemy) // got the enemy?
{
guard_life -= 10;
}
else
{
guard_life += 10;
}
wait (1);
}
}