|
Will work for food. Maybe
|
 |
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
|
|
Quote:
Originally Posted by xXziroXx
Why not just loop through maxhearts instead?
|
Hmm?
Here's a small clipping from the script to show what I'm doing, exactly.
PHP Code:
function onTimeout() { hideimgs(200,imgid); // This is what I'm doing currently to hide them this.imgid=200; guiShow();
setTimer(0.05); }
function guiShow() { // DISPLAY HEARTS for (i=0;i<player.fullhearts;i++) { if (i==int(player.hearts) && player.hearts.pos(".")>0) imgshow(12+(i*16),12,{36,0,16,16},5); else if (i<int(player.hearts+.5)) imgshow(12+(i*16),12,{20,0,16,16},5); else imgshow(12+(i*16),12,{52,0,16,16},5); }
// DISPLAY RUPEES temp.rupeeloc=12+(player.fullhearts<11?11*16:(player.fullhearts+1)*16); imgshow(rupeeloc,12,{68,0,16,16},5); shownumbers(player.rupees,rupeeloc+18,13); }
function shownumbers(num,x,y) { temp.numref="0123456789:"; for (i=0;i<num.length();i++) imgshow(x+(i*12),y,{numref.pos(num.charat(i))*14,32,14,16},5); }
function imgshow(x,y,part,layer,colors,mode) { showimg(this.imgid,this.guiIMAGE,x,y); changeimgpart(this.imgid,part[0],part[1],part[2],part[3]); changeimgvis(this.imgid,layer); if (mode!=null) changeimgmode(this.imgid,mode); else changeimgmode(this.imgid,1); if (colors!=null) changeimgcolors(this.imgid,colors[0],colors[1],colors[2],colors[3]); else changeimgcolors(this.imgid,1,1,1,1); this.imgid++; }
As for Zero, from what I'm gathering you're categorizing images. I'm not sure that's exactly what I want to do. |
|