Hi
I have this code…
function CreateFood() {
for (i=0; i<_root.food; i++) {
moreFood = attachMovie("food", "food"+i, i+1);
with (moreFood) {
_x = random(Math.floor(530))+25;
_y = random(Math.floor(370))+25;
this.onEnterFrame = function() {
if (this.hitTest(_root.circle)) {
_root.score+5;
}
};
}
}
}
…and its meant to make 5 copies of the MC food with the onEnterFrame function to make it continually watch to see if it it touched by the MC circle and increase score by 5, now no matter how much i change the way the hitTest is written it will not increase my score var
So what can I do ?
P.S
I just changed _root.score+5 to _root.score = _root.score+5 and it continually went up in fives:puzzle: what do i do ?!?!?!