This might seem like a realu simple question, but I’m having the hardest time on my flash assignement. anyways it’s a realy basic game. you have a pacman type figure, eating stars that come from the right of the screen randomly. so where I’m stuck is that I can not get me pacman figure to eat any of the duplicates, he only eats the original and I can’t the stars to constantly appear; they go accros the screen once and never return…
my game is seperated in 3 layers for now, so I have the
star layer
pacman layer
and backround layer
my sript is as follows
on the star which is (redstar_mc)
onClipEvent(enterFrame)
{
speed = 8;
this._x -= speed;
}
the pacman figure
onClipEvent (load)
{
moveit = 10;
score=0;
_root.score_txt.text=score;
}
onClipEvent (enterFrame)
{
if(_root.man_mc.hitTest(_root.redstar_mc))
{
unloadMovie(_root.redstar_mc);
score=score+5;
_root.score_txt.text=score;
}
if ((Key.isDown(Key.RIGHT)))
{
this._x += moveit;
}
else if ((Key.isDown(Key.LEFT)))
{
this._x -= moveit;
}
if ((Key.isDown(Key.DOWN)))
{
this._y += moveit;
}
else if ((Key.isDown(Key.UP)))
{
this._y -= moveit;
}
}
and on the backround layer
count = 1;
while (count<5)
{
_root.redstar_mc.duplicateMovieClip(“star”+count, count);
_root[“star”+count]._y = random(150);
count += 1;
}
so basically I just do not know what to do, I’ve been on it for the last 2 days…