Hi guys, I'm running into a problem..
I want my skillmenu to load a picture based on actor ID. Now I found this topic which seems to have some results:
http://www.rpgmakercentral.com/topic/33527-solved-drawing-pictures-in-scripts/
However, for the life of me I can't get it fixed. It's giving me errors all over the place. What's wrong with the code I added?
It's giving me errors on the "when 2". Can anyone help out, please?
I want my skillmenu to load a picture based on actor ID. Now I found this topic which seems to have some results:
http://www.rpgmakercentral.com/topic/33527-solved-drawing-pictures-in-scripts/
However, for the life of me I can't get it fixed. It's giving me errors all over the place. What's wrong with the code I added?
Code:
class Window_SkillStatus < Window_Base
# x: x coordinate
# y: y coordinate
# path: Path/Folder and name of the image "Graphics/Pictures/picture.png" for example
def draw_image(bitmap, width, height)
x = (bitmap.width - width) * 0.5
y = (bitmap.height - height) * 0.5
case actor.id
when 1
bitmap = Bitmap.new("Graphics/Pictures/picture.png")
self.contents.blt(x,y,bitmap,Rect.new(0,0,bitmap.width,bitmap.height))
end
when 2
def draw_image(bitmap, width, height)
x = (bitmap.width - width) * 0.5
y = (bitmap.height - height) * 0.5
bitmap = Bitmap.new("Graphics/Pictures/picture.png")
self.contents.blt(x,y,bitmap,Rect.new(0,0,bitmap.width,bitmap.height))
end
end
It's giving me errors on the "when 2". Can anyone help out, please?