View Single Post
  #2  
Old 06-07-2011, 04:44 AM
salesman salesman is offline
Finger lickin' good.
salesman's Avatar
Join Date: Nov 2008
Location: Colorado
Posts: 1,865
salesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud of
The reason it only works for the rifle is because it is the last member of the array. It is being set to true properly for the rest of them, but you're also immediately setting it back to false in the next loop iteration.

Try breaking out of the loop after you set it to true (and have performed all of your logic).

edit: if you still need to hide remaining images, play with hideImgs(start, end). There's really no need to continue looping to hide the rest of the images because you know exactly how many you have
PHP Code:
// Hide remaining images
hideImgs(203 1203 this.equipSlotCount);
hideImgs(223 1223 this.equipSlotCount);

break; 
// break out of your loop 
might have failed at math, but you get the idea
__________________

Last edited by salesman; 06-07-2011 at 05:04 AM..
Reply With Quote