Hi, I haven't touched RMXP in ages, but want to get back into it. The first thing I need help with, is putting faces into windows. I have kind of found out how to do it (by complete fluke, I must add) from what I can remember, but I'm having a problem with the x/y co-ords of the image.
Here is what it looks like, I've just used a sample image in a sample project to show you the error:
However, if I change the X and Y of the image, it stays there and does not move. I have put the code in window class being shown (with th hp bar, sp bar, etc).
Here is the code I've made so far:
Could anybody point out where I've gone wrong please? Thanks.
Here is what it looks like, I've just used a sample image in a sample project to show you the error:
However, if I change the X and Y of the image, it stays there and does not move. I have put the code in window class being shown (with th hp bar, sp bar, etc).
Here is the code I've made so far:
Code:
class Window_Stat < Window_Base
def initialize
super(350, 100, 240, 180)
self.contents = Bitmap.new(width - 32, height - 32)
self.opacity = 150
refresh
end
def draw_actor_face(x, y)
@picture = Sprite.new
@picture.bitmap = RPG::Cache.picture("1")
end
def refresh
self.contents.clear
w = 100
actor = $game_party.actors[0]
self.contents.font.color = system_color
draw_actor_name(actor, 4, 0)
draw_actor_graphic(actor, 60, 80)
draw_actor_face(4, 40)
draw_actor_hp(actor, 50,0)
draw_hp_bar(actor, 90, 30, w)
draw_actor_sp(actor, 50, 40)
draw_sp_bar(actor, 90, 70)
draw_exp_bar(actor, 4, 100)
end
end
Could anybody point out where I've gone wrong please? Thanks.