|
HELP!!!
#297769
11/09/09 19:21
11/09/09 19:21
|
Joined: Nov 2008
Posts: 109
JGGamer
OP
Member
|
OP
Member
Joined: Nov 2008
Posts: 109
|
I've been going at this now for a week. From Packman2008
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?
|
|
|
Re: HELP!!!
[Re: JGGamer]
#297813
11/10/09 01:56
11/10/09 01:56
|
Joined: Feb 2008
Posts: 3,232 Australia
EvilSOB
Expert
|
Expert
Joined: Feb 2008
Posts: 3,232
Australia
|
try it with this instead while ((vec_dist(my.x,player.x)>8)&&(!key_space)) sometimes the appropriate brackets make all the difference.
"There is no fate but what WE make." - CEO Cyberdyne Systems Corp. A8.30.5 Commercial
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|