I've been going at this now for a week.

From Packman2008

Code:
action point()	//the 'dots' (things that pacman likes to eat.)
{
	set(my,PASSABLE);	//so monsters will not stuck with it.
	while (vec_dist(my.x,player.x)>8) 
	{
		my.pan += time_step * 4;
		wait(1);
	}	//way to avoid colision using.
	points -= 1;
	snd_play(eat,50,50);
	ent_remove(me); //pacman 'eats' it and its removed.
}



This code lets packman eat the dots as long as he is close enough. How can I make packman eat when he is close enough to a dot, but only when I press the space key?