Quote:
Originally Posted by DeCeaseD
How exactly would I break out of the loop though, I don't really get it. 
|
Something like this, although I haven't tested obviously:
PHP Code:
//Mouse over for Slot
this.newDebug = false; // assume false
temp.mouse_xy = {mousescreenx, mousescreeny};
for ( i=0; i < this.equipSlotCount; i++; ) {
temp.chSlots = this.equipSlots[i];
if ( mouse_xy[0] in |menu_xy[0] + chSlots[1], menu_xy[0] + chSlots[1] + 32| &&
mouse_xy[1] in |menu_xy[1] + chSlots[2], menu_xy[1] + chSlots[2] + 32| ) {
this.newDebug = true;
///// snip your image stuff //////
// Hide remaining images
hideImgs(203 + i + 1, 203 + this.equipSlotCount);
hideImgs(223 + i + 1, 223 + this.equipSlotCount);
// break out of the loop b/c we only have one mouse location and we already know which object it's hovering over
break;
} else { // Keep this to hide the images before we find one that's true
hideImg(203 + i);
hideImg(223 + i);
}
}