The RPG Maker Resource Kit

RMRK RPG Maker Creation => RPG Maker General => General Scripting => Topic started by: SiR_VaIlHoR on January 19, 2006, 05:09:24 PM

Title: Kingdom Hearts Bar
Post by: SiR_VaIlHoR on January 19, 2006, 05:09:24 PM
Here for you,

(https://rmrk.net/proxy.php?request=http%3A%2F%2Fimg451.imageshack.us%2Fimg451%2F9848%2Fbarre17kb.png&hash=253f7b3547f81ffd439f5a8b9ed11c834b67b388)

add at the end of Window_Base:

def dibuja_angulo(actor, x,y,radio,ancho)
 i=0.25
ang_ini = 0
if actor.hp >= (actor.maxhp.to_i*75)/100
ang_fin = 270
w = actor.hp - (actor.maxhp*75)/100
else
ang_fin = (actor.hp*360)/actor.maxhp
w = 0
end
for j in 1..ancho
while (i<=ang_fin)
  lax = Math.cos(((i+90)*Math::PI)/180)*(radio+j)
  lay = Math.sin(((i+90)*Math::PI)/180)*(radio+j)
  contents.set_pixel(x+lax,y+lay,Color.new(55, 250-j*5,55 ,255))
i= i + 0.25
end
contents.fill_rect(x,y+(radio)+j, w,1, Color.new(55, 250-j*5,55 ,255))
i=0.25
end
w = actor.sp/3
for j in 1..(7*ancho/8)
contents.fill_rect(x,y+((7)*radio/8)+j, w,1, Color.new(55, 55 ,250-j*5,255))
end

w = (actor.hp/6)
for j in 0..w #j es la x e y la y
i = ((j*j/2)-(j) )/200 + (ancho/4)
contents.fill_rect(x+j+(radio), y-i+((4)*radio/8),1,ancho+i, Color.new(255, 100+j, 100-i, 255))
end
end

end


and in Window_Status

dibuja_angulo(@actor, x+40,y+100,30,3)
Title: Kingdom Hearts Bar
Post by: LinkaN on January 19, 2006, 05:38:39 PM
um is that kh?
I dont think it looks like it
Title: Kingdom Hearts Bar
Post by: SiR_VaIlHoR on January 19, 2006, 06:03:49 PM
Are u really played to KH??
Title: Kingdom Hearts Bar
Post by: LinkaN on January 19, 2006, 07:56:05 PM
Yes. I have it for the gba and ps2.
Title: Kingdom Hearts Bar
Post by: Tsunokiette on January 19, 2006, 08:43:28 PM
Nice job (it's a lot like KH)

@LinkaN - you're probably thinking that because you're used to seeing a face as opposed to the sprite, etc.
Title: Kingdom Hearts Bar
Post by: ahref on January 19, 2006, 09:13:17 PM
it seems wonkey to me or is it just the screenie
Title: Kingdom Hearts Bar
Post by: SiR_VaIlHoR on January 20, 2006, 01:43:37 PM
I know it's not EXACTLY like KH but it's look like no?
Title: Kingdom Hearts Bar
Post by: ken_adams on January 20, 2006, 10:32:41 PM
That looks exactly like one that I saw on this site before.  I think I saw it like a week ago.
Title: Kingdom Hearts Bar
Post by: Ayden on January 22, 2006, 06:06:39 PM
crap im getting a syntax error on line 355. I stuck the first script at the bottem of window base, and the secon one at the bottem of window status. I must be sticking this in wrong. can somone plz help?
Title: same
Post by: sam_9000 on February 18, 2006, 07:34:38 PM
i keep getting syntax errors too...
Title: Kingdom Hearts Bar
Post by: Lord Dante on February 18, 2006, 07:52:17 PM
it looks KINDOF like it...


the circle actually goes around the picture starting on the left and going up and around to the right, and it has blocks instead of one long bar, but its pretty good anyways.