hey guys.
i have an array problem.
i have an mc called man which is duplicated and added to the end of an array and i want to check for collision with the mcs in the array with an mc called bomb. this i have done but the problem i have is that there is a variable inside each instance of man mc which i want to access through the array on collsion, basically i want to take 10 of the health (this is the variable).
this is my hit test code inside the bomb mc.
if (this._name != "bomb") {
for (i=0; i < _root.manArray.length; i++) {
if (this.hitTest(_root.manArray*)) {
_root.manArray*.health-10;
removeMovieClip(this);
}
}
}
i must stress that the collision occurs and works but not the accessing of the variable and minusing of the health because the man mc should remove itself if its health reaches zero.
cheers in advance.