hiTest

Hey everBody

Hows it going.
Well not so well for me…
Im gettin pi***** off that i cant get this

hitTest working ill give you the code

 onClipEvent (load) {
    speed = 10;
    _x = random(380)+150;
    _y = 0;
}
onClipEvent (enterFrame) {
    this._y += speed;
    if (_y == 450) {
        _root.ballon.removeMovieClip();
        this.duplicateMovieClip("ballon"+c, c);
        c++;
        if (hitTest(_root.hero)) {
            gotoAndStop(2);
        }
    }
}
{

And i have a guy that has the instance with hero and a guy that walks but this little code wont work can you think of a way for me plz ppl

Hi,

I would push the duplications into an array and then hitTest the the hero against the contents of the array in a ‘for’ loop.

I think a good rule to follow is:
creation of elements : duplication your case.
sstoring of elements : push the created elements into an array
access to elements : for loop.

Cheers

SHO