Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Faces in menu

Ok i did search for this and i did use to know how to do this but ive completely forgot can someone just put down for me here what to put into window_base i can mess around with it then thank you alot
and i did search for this but no luck
 
Code:
Window_Base < Window
def draw_actor_face(actor, x, y)
bitmap = RPG::Cache.picture("Faces/" + actor.character_name)
self.contents.blt(x, y, bitmap, Rect.new(0,0,85,85))
end
end

Just put this in a new window above main. Then to use the facesets, just use
Code:
draw_actor_face(actor, x, y)
in Window_MenuStatus in the refresh method. The facesets must have the sprite's name, like 001-Fighter01 and can be 85 x 85. You also have to make a new folder in the "Pictures" folder and name it "Faces".
 
How this code be used to replace the battler pictures with faces. Btw im using Minkoffs CBS so err...basically I want to keep the animated battler pics, but to add faces to the command/status windows (I hope you know what I mean!) Cheers and thanks for this useful code! :D
 
Just put the code above, in a new window above main. Then you only need to add in Window_BattleStatus after
Code:
actor_x = i * 160 + 4
Code:
draw_actor_face(actor, actor_x, 0)
 
holy **** wow a reply to this!! Cheers! Thanks - im gonna check it out write now...
btw, should i just add this code 'actor_x = i * 160 + 4' to this code


Window_Base < Window
def draw_actor_face(actor, x, y)
bitmap = RPG::Cache.picture("Faces/" + actor.character_name)
self.contents.blt(x, y, bitmap, Rect.new(0,0,85,85))
end
end

and where in that script should i put the 2nd code you mentioned?? (Tank Yuu!) cheers again...blayz...:D:D

EDIT: darn! It keeps coming up with the error - (something like) undefined local variable or method 'i' for window battlestatus...

actor_x = i * 160 + 4

But i think i might have done something wrong, so if you have time you think you could help?...possibly? Cheers for the code though - very much appreciated!!
 
Just put this in a new window above main:
Code:
Window_Base < Window
def draw_actor_face(actor, x, y)
bitmap = RPG::Cache.picture("Faces/" + actor.character_name)
self.contents.blt(x, y, bitmap, Rect.new(0,0,85,85))
end
end

Then in the script Window_BattleStatus find the line:
Code:
actor_x = i * 160 + 4

After that add this right after it:
Code:
draw_actor_face(actor, actor_x, 0)
 
:lol: Woo! Yep - it works...no problem! Thanks cheers everything! This is great, im suprised at how simple this code is, but its gonna come in useful for many other things too. Weyyy, thanks again for helpin' Raziel! And sorry for bein' a bit retarded before :/
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top